0 and 1 Help... (License) - 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: 0 and 1 Help... (License) (
/showthread.php?tid=329408)
0 and 1 Help... (License) -
Gooday - 28.03.2012
Hello guyz i needa simple system with
haslicense = 0 -> Removeplayerfromvehicle
haslicense = 1 -> Can drive
Also i need a command that from haslicense = 0 it gives haslicense = 1
Like. /License ->Haslicense = 1
I dont know how to do :! Is basically a simple driving license system
Re: 0 and 1 Help... (License) -
wups - 28.03.2012
Quote:
haslicense = 0 -> Removeplayerfromvehicle
|
You already mentioned what you wanna do. Learn some scripting basics, you aren't gonna go far like that
Listen: You have a callback, when a player's state changes. Check if he's a driver:
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
// check if he has license
if(!License[playerid]) RemovePlayerFromVehicle(playerid);
}
}
Re: 0 and 1 Help... (License) -
Gooday - 28.03.2012
Ye but I need ALL the includes

I dunno how to
Re: 0 and 1 Help... (License) -
Jonny5 - 28.03.2012
this does the check when a player tries to enter a vehicle.
so this will work for ALL vehicles.
Re: 0 and 1 Help... (License) -
Gooday - 28.03.2012
I just need the defines to add in the top and other things

I donno how to use 1 and 0