Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (
/showthread.php?tid=408016)
Help -
Louris - 16.01.2013
Код:
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)
Re: Help -
LarzI - 16.01.2013
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);
}
Re: Help -
DiGiTaL_AnGeL - 16.01.2013
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.