#1

Код:
    if(GetPlayerSpeed(playerid) > 270)
    {
        TogglePlayerControllable(playerid,0);
        format(string, sizeof(string), "%s Vaћiavo didesniu nei 270 km/h greičiu. /stebeti %s", name, name);
        for(new i=0; i<MAX_PLAYERS; i++) if(PlayerInfo[i][pAdmin] == 1) SendClientMessage(i, -1, string);
	    }
How to make to script don't work for vips? Enum:


if(PlayerInfo[playerid][pVip] == 1)
Reply
#2

Make it not work for VIPs? You pretty much just did it.

pawn Код:
if( PlayerInfo[ playerid ][ pVip ] == 0 )
{
    if(GetPlayerSpeed(playerid) > 270)
    {
        TogglePlayerControllable(playerid,0);
        format(string, sizeof(string), "%s Vaћiavo didesniu nei 270 km/h greičiu. /stebeti %s", name, name);
        for(new i=0; i<MAX_PLAYERS; i++) if(PlayerInfo[i][pAdmin] == 1) SendClientMessage(i, -1, string);
    }
}
or

pawn Код:
if(GetPlayerSpeed(playerid) > 270 && PlayerInfo[ playerid ][ pVip ] == 0)
{
    TogglePlayerControllable(playerid,0);
    format(string, sizeof(string), "%s Vaћiavo didesniu nei 270 km/h greičiu. /stebeti %s", name, name);
    for(new i=0; i<MAX_PLAYERS; i++) if(PlayerInfo[i][pAdmin] == 1) SendClientMessage(i, -1, string);
}
Reply
#3

pawn Код:
if(GetPlayerSpeed(playerid) > 270)
    {
        if(PlayerInfo[playerid][pVip] == 1)
        {
            SendClientMessage(playerid, 0xFF0000FF, "You don't have acces to this command!");
        }
        else
        {
        TogglePlayerControllable(playerid,0);
        format(string, sizeof(string), "%s Važiavo didesniu nei 270 km/h greičiu. /stebeti %s", name, name);
        for(new i=0; i<MAX_PLAYERS; i++) if(PlayerInfo[i][pAdmin] == 1) SendClientMessage(i, -1, string);
        }
    }
You won't be able to acces the cmd if you are a VIP, how you asked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)