02.08.2013, 01:12
Eu usei o serach rodei muuito mas os comandos que tinha era tudo bugado preciso do comando /skin alguem tem ? quem tiver posta ae que dou rep..
if(strcmp(cmdtext, "/skin", true) == 0)
{
new SkiN;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "[USO CORRETO] /skin [skinid]");
if((strval(tmp) < 0) || (strval(tmp) > 299)) return SendClientMessage(playerid, COR_VERMELHA, "[ERRO] O ID das skins sгo de 0 atй 299!");
SendClientMessage(playerid, -1, "[INFO] Skin modificada !");
SkiN= strval(tmp);
SetPlayerSkin(playerid, SkiN);
return 1;
}
COMMAND:skin(playerid, params[])
{
new Msg[128], Skin;
if (sscanf(params, "i", Skin))return SendClientMessage(playerid, 0xFF0000AA, "Use: /skin [id(0-299)]");
else
{
if ((Skin >= 0) && (Skin <= 299))
{
SetPlayerSkin(playerid, Skin);
format(Msg, 128, "{00FF00}Vocк mudou o skin: {FFFF00}%i.", Skin);
SendClientMessage(playerid, 0xFF0000FF, Msg);
}
else
SendClientMessage(playerid, 0xFF0000FF, "Skin invбlido use valores entre 0 e 299.");
}
return 1;
}
if(strcmp(cmd,"/skin", true)==0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
new plid, skin;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, " Digite: /skin [id] [skin]");
return 1;
}
plid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, " Digite: /skin [id] [skin]");
return 1;
}
skin = strval(tmp);
if(IsPlayerConnected(plid)){
if(skin >= 0 && skin < 300){
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
dini_IntSet(file2, "Skin", skin);
SetPlayerSkin(plid,skin);
format(string, sizeof(string), "| INFO | O Administrador %s (%d) alterou sua skin para: ( %d )", aname,playerid,skin);
SendClientMessage(plid,AdminCor, string);
SendClientMessage(playerid, Verde, "* Comando efetuado com sucesso!");
return 1;
}else{
SendClientMessage(playerid, Vermelho, "* ID Invalido.");
return 1;
}
}else{
SendClientMessage(playerid, Vermelho, " Jogador nгo conectado.");
return 1;
}
}
}
if(strcmp(cmdtext, "/skin", true) == 0)
{
new Msg[128], Skin;
if (sscanf(params, "i", Skin))return SendClientMessage(playerid, 0xFF0000AA, "Use: /skin [id(0-299)]");
else
{
if ((Skin >= 0) && (Skin <= 299))
{
SetPlayerSkin(playerid, Skin);
format(Msg, 128, "{00FF00}Vocк mudou o skin: {FFFF00}%i.", Skin);
SendClientMessage(playerid, 0xFF0000FF, Msg);
}
else
SendClientMessage(playerid, 0xFF0000FF, "Skin invбlido use valores entre 0 e 299.");
}
return 1;
}