28.07.2011, 18:58
Era disso que eu estava falando:
PHP Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/skin", true) == 0)
{
new skin[256];
skin = strtok(cmdtext, idx);
if(!strlen(skin)) return SendClientMessage(playerid, 0xFFFFFFFF, "USO: /skin [ID DA SKIN]");
if(299 < strval(skin) < 0) return SendClientMessage(playerid, 0xFF0000FF, "Skin invбlida !");
SetPlayerSkin(playerid, strval(skin));
format(skin, 20, "Nova skin: %d.", strval(skin));
SendClientMessage(playerid, 0xFFFF00FF, skin);
return 1;
}
return 0;
}