28.07.2009, 18:24
i need this command
and the skin will stay forever
and the skin will stay forever
new Skin2;
new giveplayerid;
if(strcmp(cmd, "/SetSkin", true) == 0)
{
new getplayerid;
getplayerid = strval(tmp)
new playername[MAX_PLAYER_NAME]
GetPlayerName(getplayerid,playername,sizeof(playername));
new adminname[MAX_PLAYER_NAME]
GetPlayerName(playerid,adminname,sizeof(adminname));
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"Usage: /Setskin playerid [0-299]");
SendClientMessage(playerid,COLOR_WHITE,"This command is setting player skin");
SendClientMessage(playerid,COLOR_WHITE,"The skin number must be between 0-299");
SendClientMessage(playerid,COLOR_WHITE,"The skin will save forever,if someone not remove it");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
tmp = strtok(cmdtext, idx);
cash = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"Usage: /Setskin playerid [0-299]");
SendClientMessage(playerid,COLOR_WHITE,"This command is setting player skin");
SendClientMessage(playerid,COLOR_WHITE,"The skin number must be between 0-299");
SendClientMessage(playerid,COLOR_WHITE,"The skin will save forever,if someone not remove it");
return 1;
}
else
{
Skin2 = strval(tmp);
if(Skin2 < 0 || Skin2 > 299)
{
SendClientMessage(playerid,COLOR_WHITE,"Usage: /Setskin playerid [0-299]");
SendClientMessage(playerid,COLOR_WHITE,"This command is setting player skin");
SendClientMessage(playerid,COLOR_WHITE,"The skin number must be between 0-299");
SendClientMessage(playerid,COLOR_WHITE,"The skin will save forever,if someone not remove it");
return 1;
}
else
{
SetPlayerSkin(giveplayerid,Skin2);
SendClientMessage(playerid,COLOR_WHITE,"You set %s(ID:%d) skin to %s",playername,getplayer,Skin2);
SendClientMessage(getplayer,COLOR_WHITE,"Admin %s(ID:%d) set your skin to %s",adminname,playerid,Skin2);
}
}
}
return 1;
}