for(new j = 0; j < sizeof(GsfCar); j ++)
{
if(vehicleid == GsfCar[j] && PlayerInfo[pInfo][pOrgID] <= 0)
{
ClearAnimations(playerid);
GameTextForPlayer(playerid,"~r~ GROVE STREET FAMILIES",1250,4);
}
else if(PlayerInfo[pInfo][pOrgID] > 1)
{
ClearAnimations(playerid);
GameTextForPlayer(playerid,"~r~ GROVE STREET FAMILIES",1250,4);
}
}
return 1;
}
new GsfCar[2];
GsfCar[0] = CreateVehicle ... // ID 1
Create Vehicle ... // ID 2
Create Vehicle ... // ID 3
Create Vehicle ... // ID 4
GsfCar[1] = CreateVehicle ... // ID 5
// So you got the offset 1-5
OnPlayerEnterVehicle() {
if(vehicleid>=GsfCar[0]&&GsfCar[1]<=vehicleid) {
// This is a GSF Car
// Check if you belong to GSF , if not ClearAnimation
}
}
for(new j = 0; j < sizeof(GsfCar); j ++) {
if(vehicleid == GsfCar[j] && PlayerInfo[pInfo][pOrgID] != 1) {
ClearAnimations(playerid);
GameTextForPlayer(playerid,"~r~ GROVE STREET FAMILIES",1250,4);
}
}
|
What ID is grove? I mean what PlayerInfo[pInfo][pOrgID] is grove?
|
we all need a learning curve lol, just remember less is best.
|
Np
we all need a learning curve lol, just remember less is best. |
|
Thats why you should use my version cause it doesnt require a for loop.
|
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(playerid, vehicleid) {
new carowner = VehicleInfo[vehicleid][EVehicleOwner];
if(carowner != BlahBlah) {
do this
} else { do this }
}