SA-MP 0.3.DL
Tutoriais de como adicionar skin, objeto e utilizar o Redirect()
Й necessбrio estб utilizando o SA-MP 0.3.DL
Tutoriais de como adicionar skin, objeto e utilizar o Redirect()
Й necessбrio estб utilizando o SA-MP 0.3.DL
- Como usar o adicionar skins server-side
- Vocк deverб abrir a pasta models dentro do seu sa-mp server.
- Ao abrir tal pasta vocк deverб adicionar o .dff e .txd da skin desejada.
- Apуs coloca-los na pasta models do seu sa-mp server, vocк deverб editar o arquivo artconfig.txt, localizado nesta mesma pasta.
Use o parametro AddCharModel(baseid, newid, dffname[], txdname[]); dentro do artconfig.txt. - baseid - Serб a skin que ele irб copiar os movimentos e falas, dentre as 311 skins disponнveis (0-311).
- newid - Deverб ser o novo ID da skin, entre 20000 e 30000 (ex: 20012).
- dffname[] - Deverб ser o caminho do arquivo .dff desta skin a partir da pasta models dentro do seu sa-mp server.
- txdname[] - Deverб ser o caminho do arquivo .txd desta skin a partir da pasta models dentro do seu sa-mp server.
Ex:
- Código:
AddCharModel(280, 25000, "police_asiatic.dff", "police_asiatic.txd");
- Código:
useartwork 1
Use o parametro AddSimpleModel(virtualworld, baseid, newid, dffname[], txdname[]); dentro do artconfig.txt.
Ex:
- Código:
AddSimpleModel(-1, 18865, -1000, "AxomCamPOLICE1.dff", "AxomCamPOLICE1.txd");
- Código:
useartwork 1
- Código:
public OnPlayerRequestDownload(playerid, type, crc)
{
return 1;
}
- Código:
new SERVER_DOWNLOAD[];
public OnPlayerRequestDownload(playerid, type, crc)
{
return 1;
}
- Código:
new SERVER_DOWNLOAD[] = "http://www.dev-wil.com/downloads/038/models";
public OnPlayerRequestDownload(playerid, type, crc)
{
return 1;
}
- Código:
new SERVER_DOWNLOAD[] = "http://www.dev-wil.com/downloads/038/models";
public OnPlayerRequestDownload(playerid, type, crc)
{
if(!IsPlayerConnected(playerid))
return 0;
if(type == DOWNLOAD_REQUEST_TEXTURE_FILE)
{}
else if(type == DOWNLOAD_REQUEST_MODEL_FILE)
{}
return 1;
}
- Código:
new SERVER_DOWNLOAD[] = "http://www.dev-wil.com/downloads/038/models";
public OnPlayerRequestDownload(playerid, type, crc)
{
if(!IsPlayerConnected(playerid))
return 0;
if(type == DOWNLOAD_REQUEST_TEXTURE_FILE)
FindTextureFileNameFromCRC(crc, retstr[], retstr_size);
else if(type == DOWNLOAD_REQUEST_MODEL_FILE)
FindModelFileNameFromCRC(crc, retstr[], retstr_size);
return 1;
}
- Código:
new SERVER_DOWNLOAD[] = "http://www.dev-wil.com/downloads/038/models";
public OnPlayerRequestDownload(playerid, type, crc)
{
if(!IsPlayerConnected(playerid))
return 0;
new filename[64];
if(type == DOWNLOAD_REQUEST_TEXTURE_FILE)
FindTextureFileNameFromCRC(crc, filename, sizeof(filename));
else if(type == DOWNLOAD_REQUEST_MODEL_FILE)
FindModelFileNameFromCRC(crc, filename, sizeof(filename));
return 1;
}
- Código:
new SERVER_DOWNLOAD[] = "http://www.dev-wil.com/downloads/038/models";
public OnPlayerRequestDownload(playerid, type, crc)
{
if(!IsPlayerConnected(playerid))
return 0;
new filename[64], filefound;
if(type == DOWNLOAD_REQUEST_TEXTURE_FILE)
filefound = FindTextureFileNameFromCRC(crc, filename, sizeof(filename));
else if(type == DOWNLOAD_REQUEST_MODEL_FILE)
filefound = FindModelFileNameFromCRC(crc, filename, sizeof(filename));
return 1;
}
- Código:
new SERVER_DOWNLOAD[] = "http://www.dev-wil.com/downloads/038/models";
public OnPlayerRequestDownload(playerid, type, crc)
{
if(!IsPlayerConnected(playerid))
return 0;
new filename[64], filefound;
if(type == DOWNLOAD_REQUEST_TEXTURE_FILE)
filefound = FindTextureFileNameFromCRC(crc, filename, sizeof(filename));
else if(type == DOWNLOAD_REQUEST_MODEL_FILE)
filefound = FindModelFileNameFromCRC(crc, filename, sizeof(filename));
if(filefound)
{}
return 1;
}
- Código:
new SERVER_DOWNLOAD[] = "http://www.dev-wil.com/downloads/038/models";
public OnPlayerRequestDownload(playerid, type, crc)
{
if(!IsPlayerConnected(playerid))
return 0;
new filename[64], filefound, url_final[256];
if(type == DOWNLOAD_REQUEST_TEXTURE_FILE)
filefound = FindTextureFileNameFromCRC(crc, filename, sizeof(filename));
else if(type == DOWNLOAD_REQUEST_MODEL_FILE)
filefound = FindModelFileNameFromCRC(crc, filename, sizeof(filename));
if(filefound)
{
format(url_final, sizeof(url_final), "%s/%s", SERVER_DOWNLOAD, filename);
}
return 1;
}
- Código:
new SERVER_DOWNLOAD[] = "http://www.dev-wil.com/downloads/038/models";
public OnPlayerRequestDownload(playerid, type, crc)
{
if(!IsPlayerConnected(playerid))
return 0;
new filename[64], filefound, url_final[256];
if(type == DOWNLOAD_REQUEST_TEXTURE_FILE)
filefound = FindTextureFileNameFromCRC(crc, filename, sizeof(filename));
else if(type == DOWNLOAD_REQUEST_MODEL_FILE)
filefound = FindModelFileNameFromCRC(crc, filename, sizeof(filename));
if(filefound)
{
format(url_final, sizeof(url_final), "%s/%s", SERVER_DOWNLOAD, filename);
RedirectDownload(playerid, url_final);
}
return 1;
}
Creditos: willttoonn