Kush's Tutorial.
#3

pawn Код:
YCMD:spawnvehicle(playerid, params)
{
    if(PlayerInfo[playerid][pAdmin] < 1  ) return SendClientMessage(playerid, -1, "You are not an admin!");
    new skin, player;
    if(sscanf(params, "ud", player, skin)) return SendClientMessage(playerid, COLOR_GREY, "YCMD: /setskin [Part of Name/ID] [SkinID]");
    if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_GREY, "YCMD: Invalid skin!");
    SetPlayerSkin(player, skin);
    return 1;
}
This is an example.

if(PlayerInfo[playerid][pAdmin] <1 ) return SendClientMessage(playerid, -1, "You are not an admin!"); <--- Checks if they are an Admin...
Reply


Messages In This Thread
Kush's Tutorial. - by DownDuckling - 31.10.2012, 01:49
Re: Kush's Tutorial. - by Lуs - 31.10.2012, 01:51
Re: Kush's Tutorial. - by JhnzRep - 31.10.2012, 01:52
Re: Kush's Tutorial. - by DownDuckling - 31.10.2012, 01:53
Re: Kush's Tutorial. - by ThePhenix - 31.10.2012, 01:54
Re: Kush's Tutorial. - by DownDuckling - 31.10.2012, 01:57
Re: Kush's Tutorial. - by SwisherSweet - 31.10.2012, 02:00
Re: Kush's Tutorial. - by JaKe Elite - 31.10.2012, 02:01

Forum Jump:


Users browsing this thread: 3 Guest(s)