13.08.2010, 08:14
Hello, i want to make my license system a bit easier to script..
Here's my script:
This is my script to detect if the player has the license for the vehicle.
Now there are Bikes, Planes 'n' Boats. I don't want to write all the model again and again so
my question was if i can add something like this:
So i can add:
I hope someone will help me..
Thanks,
Greetings..
Here's my script:
Quote:
new bike = GetVehicleModel(vehicleid); new planes = GetVehicleModel(vehicleid); new boats = GetVehicleModel(vehicleid); if(bike == 581 || bike == 522 || bike == 461 || bike == 521 || bike == 463 || bike == 586 || bike == 468 || bike == 471) { if(PlayerInfo[playerid][pDriveLic] == 0) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(playerid, X, Y, Z); SendClientMessage(playerid, COLOR_DARKRED, "*** You don't know how to drive yet, get your license at the License Center. ((/gps_licensecenter))"); } } else if(planes == 592 || planes == 577 || planes == 511 || planes == 512 || planes == 593 || planes == 520 || planes == 553 || planes == 476 || planes == 519 || planes == 460 || planes == 513) { if(PlayerInfo[playerid][pFlyLic] == 0) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(playerid, X, Y, Z); SendClientMessage(playerid, COLOR_DARKRED, "*** You don't know how to fly yet, get your license at the License Center. ((/gps_licensecenter))"); } } else if(boats == 472 || boats == || boats == || boats == || boats == || boats == || boats == || boats == || ) { if(PlayerInfo[playerid][pFlyLic] == 0) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(playerid, X, Y, Z); SendClientMessage(playerid, COLOR_DARKRED, "*** You don't know how to fly yet, get your license at the License Center. ((/gps_licensecenter))"); } } return 1; } |
Now there are Bikes, Planes 'n' Boats. I don't want to write all the model again and again so
my question was if i can add something like this:
Quote:
new bike = GetVehicleModel(vehicleid); bike() { 1213; 1231321l blablabla } |
Quote:
if(model != bike) { SendClient lalblablalbla.. } |
Thanks,
Greetings..