[help] Skin commands
#2

With DCMD:

pawn Код:
dcmd_jskin(playerid, params[])
{
    #pragma unused params
    if(IsPlayerAdmin(playerid))
    {
    SetPlayerSkin(playerid, 116);
    return 1;
    }
    else
    {
      SendClientMessage(playerid, 0xFF0000FF, "You are not an admin!");
      return 1;
    }
}
Without DCMD (strtok):

pawn Код:
if(strcmp(cmd, "/jskin", 5, true) ==0)
{
  if(IsPlayerAdmin(playerid))
  {
   SetPlayerSkin(playerid, 116);
   return 1;
  }
  else
  {
   SendClientMessage(playerid, 0xFF0000FF, "You are not an admin !");
   return 1;
   }
}
the strtok is untested, if you have any problems, put them down.

for the dcmd, dont forget to put:

pawn Код:
dcmd(jskin, 5, cmdtext);
return false;
under OnPlayerCommandText.

Anyone else: If I have gotten anything wrong, feel free to correct me, as I always make mistakes.
Reply


Messages In This Thread
[help] Skin commands - by fsnameless - 17.12.2009, 00:40
Re: [help] Skin commands - by Hiitch - 17.12.2009, 00:47
Re: [help] Skin commands - by fsnameless - 17.12.2009, 00:55
Re: [help] Skin commands - by fsnameless - 17.12.2009, 03:25

Forum Jump:


Users browsing this thread: 1 Guest(s)