03.08.2013, 21:15
pawn Код:
if(strcmp("/undercover", cmdtext, true, 11) == 0) // if the player type the right cmd
{
new skinid; // create a skinid to stock de skin entered by the player
if(PlayerInfo[playerid][pTeam] == TEAM_FBI) // If the player is from TEAM_FBI (change it by the variable you have)
{
if(sscanf(cmdtext[12], "i", skinid)) SendClientMessage(playerid, 0x41A5F5FF, "[USE] /undercover <skinid>"); // If the player just type the command send this message
else
{
SetPlayerSkin(playerid, skinid); // Else change the skin with the one that te player entered
SendClientMessage(playerid, 0x41A5F5FF, "Your skin has been changed");
return 1;
}
}
}