ONPLAYERENTERVEHICLE help
#10

Quote:
Originally Posted by whadez
Посмотреть сообщение
Thats why you should use my version cause it doesnt require a for loop.
Meh, I just fixed the code he provided, I didn't attempt to change the method of use.
If anything he should really store the vehicle information in a single place not have vehicles spawned under different arrays.

Should have one array for all vehicles and then have an enum inside that array to define if it's a public vehicle or not...

PHP код:
enum EVehicleInfo {
    
EVehicleOwner
// then simply assign public = 0, 1 = blah 2 = blah 3 = blah when a vehicle is created
};
new 
VehicleInfo[MAX_VEHICLES][EVehicleInfo];
if 
you want to set a car to x gang
do that else where in the script and just put
in this 
case...GsfCar
VehicleInfo
[vehicleid][1];
How he gets the vehicle id is up to him but thats just a 10 second example.
Then it would literally just be a case of
OnPlayerEnterVehicle
(playeridvehicleid) {
          new 
carowner VehicleInfo[vehicleid][EVehicleOwner];
          if(
carowner != BlahBlah) {
               do 
this
          
} else { do this }

I also get the above code may be lacking or wrong but I just spent 10 seconds on it so not really focusing on being 100% correct and working
Reply


Messages In This Thread
ONPLAYERENTERVEHICLE help - by n00blek - 10.10.2017, 16:29
Re: ONPLAYERENTERVEHICLE help - by whadez - 10.10.2017, 16:32
Re: ONPLAYERENTERVEHICLE help - by Prokill911 - 10.10.2017, 16:32
Re: ONPLAYERENTERVEHICLE help - by n00blek - 10.10.2017, 16:38
Re: ONPLAYERENTERVEHICLE help - by Kraeror - 10.10.2017, 16:38
Re: ONPLAYERENTERVEHICLE help - by n00blek - 10.10.2017, 16:40
Re: ONPLAYERENTERVEHICLE help - by Kraeror - 10.10.2017, 16:42
Re: ONPLAYERENTERVEHICLE help - by Prokill911 - 10.10.2017, 16:43
Re: ONPLAYERENTERVEHICLE help - by whadez - 10.10.2017, 16:44
Re: ONPLAYERENTERVEHICLE help - by Prokill911 - 10.10.2017, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)