lock- cars and skins
#1

i would like to lock some cars from some skins and some skins from people unless i want them unless they apply.

for example:

the police bike, car or the swat tanker from gangs.

and the hydra and tank only army can take it! can anyone help with that ?
Reply
#2

Click http://forum.sa-mp.com/index.php?action=search;advanced
Reply
#3

Quote:
Originally Posted by MaykoX
I will give you an example how to do this,you can use SetVehicleParams but this is a better way in my opinion.

pawn Код:
OnPlayerStateChange

if(gang[playerid] == 1)
{
    new newcar = GetPlayerVehicleID(playerid);
if(newcar == 1)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        SendClientMessage(playerid,COLOR,"You are not allowed to drive this car");
        RemovePlayerFromVehicle(newcar);
    }
}
}
UNTESTED.
Just change the newcar == 1 to your car.
Reply
#4


Код:
if(newcar == 1)
{
    new newcar = GetPlayerVehicleID(playerid);
	if(newstate == PLAYER_STATE_DRIVER && GetPlayerSkin(playerid) > 0 && GetPlayerSkin(playerid) < 111)
	{
        SendClientMessage(playerid,COLOR,"You are not allowed to drive this car.");
        RemovePlayerFromVehicle(newcar);
    }
}
}
Reply
#5

C:\Users\Antonio Carlos\Desktop\Nuno\gta sa\gamemodes\lol.pwn(424) : error 028: invalid subscript (not an array or too many subscripts): "gang"
C:\Users\Antonio Carlos\Desktop\Nuno\gta sa\gamemodes\lol.pwn(424) : warning 215: expression has no effect
C:\Users\Antonio Carlos\Desktop\Nuno\gta sa\gamemodes\lol.pwn(424) : error 001: expected token: ";", but found "]"
C:\Users\Antonio Carlos\Desktop\Nuno\gta sa\gamemodes\lol.pwn(424) : error 029: invalid expression, assumed zero
C:\Users\Antonio Carlos\Desktop\Nuno\gta sa\gamemodes\lol.pwn(424) : fatal error 107: too many error messages on one line
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)