How can i do that?
#1

Hello, i want to make my license system a bit easier to script..
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;
}

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:

Quote:

new bike = GetVehicleModel(vehicleid);
bike()
{
1213;
1231321l
blablabla
}

So i can add:

Quote:

if(model != bike) {
SendClient lalblablalbla..
}

I hope someone will help me..

Thanks,
Greetings..
Reply


Messages In This Thread
How can i do that? - by Ihsan_Cingisiz - 13.08.2010, 08:14
Re: How can i do that? - by [MWR]Blood - 13.08.2010, 08:18
Re: How can i do that? - by Ihsan_Cingisiz - 13.08.2010, 08:21
Re: How can i do that? - by [MWR]Blood - 13.08.2010, 08:34
Re: How can i do that? - by Ihsan_Cingisiz - 13.08.2010, 08:44
Re: How can i do that? - by [NWA]Hannes - 13.08.2010, 09:08
Re: How can i do that? - by Mike_Peterson - 13.08.2010, 10:30

Forum Jump:


Users browsing this thread: 1 Guest(s)