[Tutorial] How to create a vehicle fix command - For Admins
#2

Quote:
Originally Posted by NewerthRoleplay
Посмотреть сообщение
[COLOR="Blue"]
Inside this command above the ( return 1; ) we are going to put this:
pawn Код:
if(PlayerInfo[playerid][pAdmin] >= 4) return SendClientMessage, 0xFFFFFFFF, " **You must be a level 4 admin to use that!");
    {
    //Rest of the script goes here
    }
This piece of code ensures us that the player is a admin, otherwise it will tell them that they have to be a level 5 admin.

Inside the 2 curly brackets ( {} ) we are going to place the main code which will fix the visual and engine damage to the car.

Well, you should change that up a little bit...

return will stop the current function, also...


pawn Код:
if(PlayerInfo[playerid][pAdmin] >= 4) return SendClientMessage, 0xFFFFFFFF, " **You must be a level 4 admin to use that!");
{
    //Rest of the script goes here
}
You should remove the return there or, at least remove the brackets.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)