Posts: 17
Threads: 2
Joined: Jun 2018
Reputation:
0
vehdata[i][carexists]
should this be
userdata[playerid][license] or userdata[playerid][agra]
cause i think you want to check if the player has a license or not and than Send a Message.
Posts: 1,228
Threads: 1
Joined: May 2018
Reputation:
0
This means the player has license and agra set to 1 at all times. Do you reset the variables?
Posts: 156
Threads: 0
Joined: Jun 2016
Well then check if the license variable is set to 1 and what is this userdata[playerid][agra] and check if this is set to 1.
If both are set to 1 then the player would be able to drive the vehicle if else they can't.
Posts: 357
Threads: 6
Joined: Feb 2018
Quote:
Originally Posted by Calisthenics
pawn Код:
if(userdata[playerid][license] && userdata[playerid][agra] == 1) { SetVehicleParamsEx(vehicleid, 1, 0, 0, 0, 0, 0, 0); } else { SendClientMessage(playerid,COLOR_KRED,"You don't have a license ! --- /GetLicense"); SetVehicleParamsEx(vehicleid, 0, 0, 0, 0, 0, 0, 0); }
|
should be like this, if license is not a bool variable.
Код:
if(userdata[playerid][license] == 1 && userdata[playerid][agra] == 1)