17.12.2009, 00:47
With DCMD:
Without DCMD (strtok):
the strtok is untested, if you have any problems, put them down.
for the dcmd, dont forget to put:
under OnPlayerCommandText.
Anyone else: If I have gotten anything wrong, feel free to correct me, as I always make mistakes.
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;
}
}
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;
}
}
for the dcmd, dont forget to put:
pawn Код:
dcmd(jskin, 5, cmdtext);
return false;
Anyone else: If I have gotten anything wrong, feel free to correct me, as I always make mistakes.