Multiple Defines -
marinov - 14.11.2010
how do I make all these be a StarsCar ?
pawn Code:
AddStaticVehicleEx(427,193.42268372,1917.46765137,17.88862419,0.00000000,-1,3,15); //Enforcer
AddStaticVehicleEx(427,202.34309387,1917.72888184,17.88862419,0.00000000,-1,3,15); //Enforcer
AddStaticVehicleEx(427,211.39657593,1917.49511719,17.88862419,0.00000000,-1,3,15); //Enforcer
AddStaticVehicleEx(427,220.60968018,1917.43066406,17.88862419,0.00000000,-1,3,15); //Enforcer
AddStaticVehicleEx(490,275.78240967,2015.96179199,17.96075058,331.53472900,-1,3,15); //FBI Rancher
AddStaticVehicleEx(490,283.71200562,2016.59545898,17.96075058,331.53442383,-1,3,15); //FBI Rancher
AddStaticVehicleEx(490,275.32498169,2031.56054688,17.96075058,218.96630859,-1,3,15); //FBI Rancher
AddStaticVehicleEx(490,282.46844482,2031.47424316,17.96075058,218.96301270,-1,3,15); //FBI Rancher
AddStaticVehicleEx(497,279.18328857,1955.96508789,17.90562439,268.13433838,-1,3,15); //Police Maverick
AddStaticVehicleEx(593,277.93148804,1989.74621582,18.19080734,272.01599121,-1,-1,15); //Dodo
Re: Multiple Defines -
blackwave - 14.11.2010
Code:
StarsCar = AddStaticVehicleEx(427,193.42268372,1917.46765137,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar = AddStaticVehicleEx(427,202.34309387,1917.72888184,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar = AddStaticVehicleEx(427,211.39657593,1917.49511719,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar = AddStaticVehicleEx(427,220.60968018,1917.43066406,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar = AddStaticVehicleEx(490,275.78240967,2015.96179199,17.96075058,331.53472900,-1,3,15); //FBI Rancher
StarsCar = AddStaticVehicleEx(490,283.71200562,2016.59545898,17.96075058,331.53442383,-1,3,15); //FBI Rancher
StarsCar = AddStaticVehicleEx(490,275.32498169,2031.56054688,17.96075058,218.96630859,-1,3,15); //FBI Rancher
StarsCar = AddStaticVehicleEx(490,282.46844482,2031.47424316,17.96075058,218.96301270,-1,3,15); //FBI Rancher
StarsCar = AddStaticVehicleEx(497,279.18328857,1955.96508789,17.90562439,268.13433838,-1,3,15); //Police Maverick
StarsCar = AddStaticVehicleEx(593,277.93148804,1989.74621582,18.19080734,272.01599121,-1,-1,15); //Dodo
Re: Multiple Defines -
marinov - 14.11.2010
I tried that but it didn't work =/
Re: Multiple Defines -
BloodyEric - 14.11.2010
new StarsCar[9];
StarsCar[0] = AddStaticVehicleEx(427,193.42268372,1917.46765137, 17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar[1] = AddStaticVehicleEx(427,202.34309387,1917.72888184, 17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar[2] = AddStaticVehicleEx(427,211.39657593,1917.49511719, 17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar[3] = AddStaticVehicleEx(427,220.60968018,1917.43066406, 17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar[4] = AddStaticVehicleEx(490,275.78240967,2015.96179199, 17.96075058,331.53472900,-1,3,15); //FBI Rancher
StarsCar[5] = AddStaticVehicleEx(490,283.71200562,2016.59545898, 17.96075058,331.53442383,-1,3,15); //FBI Rancher
StarsCar[6] = AddStaticVehicleEx(490,275.32498169,2031.56054688, 17.96075058,218.96630859,-1,3,15); //FBI Rancher
StarsCar[7] = AddStaticVehicleEx(490,282.46844482,2031.47424316, 17.96075058,218.96301270,-1,3,15); //FBI Rancher
StarsCar[8] = AddStaticVehicleEx(497,279.18328857,1955.96508789, 17.90562439,268.13433838,-1,3,15); //Police Maverick
StarsCar[9] = AddStaticVehicleEx(593,277.93148804,1989.74621582, 18.19080734,272.01599121,-1,-1,15); //Dodo
Re: Multiple Defines - Larsey123IsMe - 14.11.2010
pawn Code:
new StarsCar1, StarsCar2, StarsCar3, StarsCar4, StarsCar5, StarsCar6, StarsCar7, StarsCar8, StarsCar9, StarsCar10;
pawn Code:
StarsCar1 = AddStaticVehicleEx(427,193.42268372,1917.46765137,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar2 = AddStaticVehicleEx(427,202.34309387,1917.72888184,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar3 = AddStaticVehicleEx(427,211.39657593,1917.49511719,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar4 = AddStaticVehicleEx(427,220.60968018,1917.43066406,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar5 = AddStaticVehicleEx(490,275.78240967,2015.96179199,17.96075058,331.53472900,-1,3,15); //FBI Rancher
StarsCar6 = AddStaticVehicleEx(490,283.71200562,2016.59545898,17.96075058,331.53442383,-1,3,15); //FBI Rancher
StarsCar7 = AddStaticVehicleEx(490,275.32498169,2031.56054688,17.96075058,218.96630859,-1,3,15); //FBI Rancher
StarsCar8 = AddStaticVehicleEx(490,282.46844482,2031.47424316,17.96075058,218.96301270,-1,3,15); //FBI Rancher
StarsCar9 = AddStaticVehicleEx(497,279.18328857,1955.96508789,17.90562439,268.13433838,-1,3,15); //Police Maverick
StarsCar10 = AddStaticVehicleEx(593,277.93148804,1989.74621582,18.19080734,272.01599121,-1,-1,15); //Dodo
^^
Re: Multiple Defines -
Mike_Peterson - 14.11.2010
try this
Code:
StarsCar[0] = AddStaticVehicleEx(427,193.42268372,1917.46765137,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar[1] = AddStaticVehicleEx(427,202.34309387,1917.72888184,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar[2] = AddStaticVehicleEx(427,211.39657593,1917.49511719,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar[3] = AddStaticVehicleEx(427,220.60968018,1917.43066406,17.88862419,0.00000000,-1,3,15); //Enforcer
StarsCar[4] = AddStaticVehicleEx(490,275.78240967,2015.96179199,17.96075058,331.53472900,-1,3,15); //FBI Rancher
StarsCar[5] = AddStaticVehicleEx(490,283.71200562,2016.59545898,17.96075058,331.53442383,-1,3,15); //FBI Rancher
StarsCar[6] = AddStaticVehicleEx(490,275.32498169,2031.56054688,17.96075058,218.96630859,-1,3,15); //FBI Rancher
StarsCar[7] = AddStaticVehicleEx(490,282.46844482,2031.47424316,17.96075058,218.96301270,-1,3,15); //FBI Rancher
StarsCar[8] = AddStaticVehicleEx(497,279.18328857,1955.96508789,17.90562439,268.13433838,-1,3,15); //Police Maverick
StarsCar[9] = AddStaticVehicleEx(593,277.93148804,1989.74621582,18.19080734,272.01599121,-1,-1,15); //Dodo
Re: Multiple Defines -
rs.pect - 14.11.2010
BloodyEric, not
but
Re: Multiple Defines -
Mujib - 14.11.2010
pawn Code:
#define AMOUNT_STARTSCAR (10)
new StartsCar[AMOUNT_STARTSCAR+1];
StartsCar[0] = AddStaticVehicleEx(427,193.42268372,1917.46765137,17.88862419,0.00000000,-1,3,15); //Enforcer
StartsCar[1] = AddStaticVehicleEx(427,202.34309387,1917.72888184,17.88862419,0.00000000,-1,3,15); //Enforcer
StartsCar[2] = AddStaticVehicleEx(427,211.39657593,1917.49511719,17.88862419,0.00000000,-1,3,15); //Enforcer
StartsCar[3] = AddStaticVehicleEx(427,220.60968018,1917.43066406,17.88862419,0.00000000,-1,3,15); //Enforcer
StartsCar[4] = AddStaticVehicleEx(490,275.78240967,2015.96179199,17.96075058,331.53472900,-1,3,15); //FBI Rancher
StartsCar[5] = AddStaticVehicleEx(490,283.71200562,2016.59545898,17.96075058,331.53442383,-1,3,15); //FBI Rancher
StartsCar[6] = AddStaticVehicleEx(490,275.32498169,2031.56054688,17.96075058,218.96630859,-1,3,15); //FBI Rancher
StartsCar[7] = AddStaticVehicleEx(490,282.46844482,2031.47424316,17.96075058,218.96301270,-1,3,15); //FBI Rancher
StartsCar[8] = AddStaticVehicleEx(497,279.18328857,1955.96508789,17.90562439,268.13433838,-1,3,15); //Police Maverick
StartsCar[9] = AddStaticVehicleEx(593,277.93148804,1989.74621582,18.19080734,272.01599121,-1,-1,15); //Dodo
Re: Multiple Defines -
marinov - 14.11.2010
how do I use it on this ? :
pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == StarsCar)
{
if(team[playerid] != 6)
SendClientMessage(playerid,GREEN,"You're not S.T.A.R.S.");
{
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
Re: Multiple Defines -
Zimon95 - 14.11.2010
Try this, it should work:
pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
for(new c = 0; c < sizeof(StarsCars); c++)
{
if(vehicleid == StarsCar[c])
{
if(team[playerid] != 6)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,GREEN,"You're not S.T.A.R.S.");
break;
}
}
}
return 1;
}