VIP Cars -
ChuckyBabe - 09.03.2014
how do i make a cars for VIP only [pDonator] ?
i promise i will give +rep if u will help me.
Re: VIP Cars -
RenovanZ - 09.03.2014
This is an example how to do it.
pawn Code:
#define MAX_VIPCARS 10
new VIPCar[MAX_VIPCARS];
public OnGameModeInIt()
{
VIPCar[0] = AddStaticVehicleEx(451, 1.0, 2.0, 3.0, 4.0, 1, 1, 10);
VIPCar[1] = AddStaticVehicleEx(560, 2.0, 3.0, 4.0, 5.0, 1, 1, 10);
// and so on.
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
for(new i = 0; i < MAX_VIPCARS; i++)
{
if(vehicleid == VIPCar[i])
{
if(PlayerInfo[playerid][pDonator] == 0)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, -1, "You arent VIP");
}
}
}
return 1;
}
Re: VIP Cars -
ChuckyBabe - 09.03.2014
Where is x,y,z and where is the vehicle id where i will put it ? and 1 more question is this a filterscript, if not where i will put it in my gm?
Re: VIP Cars -
RenovanZ - 09.03.2014
Quote:
Originally Posted by ChuckyBabe
Where is x,y,z and where is the vehicle id where i will put it ? and 1 more question is this a filterscript, if not where i will put it in my gm?
|
Look at this
AddStaticVehicleEx.
Put the #define anywhere ( I suggest you to put it below the #include ), and new VIPCar[MAX_VIPCARS] below the define, and you can put the AddStaticVehicleEx below your OnGameModeInit (use CTRL+F) and so on.
Re: VIP Cars -
Mado - 09.03.2014
Quote:
Originally Posted by ChuckyBabe
Where is x,y,z and where is the vehicle id where i will put it ? and 1 more question is this a filterscript, if not where i will put it in my gm?
|
VIPCar[1] = AddStaticVehicleEx(560
Vehicle ID, 2.0
X-Coordinate, 3.0
Y-Coordinate, 4.0
Z-Coordinate, 5.0
Angle of the car, 1
Primary colour, 1
Secondary colour, 10
Respawn timer);
Re: VIP Cars -
ChuckyBabe - 09.03.2014
PHP Code:
VIPCar[0] = AddStaticVehicleEx(451, 1.0, 2.0, 3.0, 4.0, 1, 1, 10);
Where is x,y,z there ? i think 451 is the vehicle id ? 1.0=x? 2.0=y and 3.0=z? what is 4.0 and 1, 1, i think 10 is respawning time ?
what is 4.0 and 1, 1,?
Re: VIP Cars -
Mado - 09.03.2014
Quote:
Originally Posted by ChuckyBabe
PHP Code:
VIPCar[0] = AddStaticVehicleEx(451, 1.0, 2.0, 3.0, 4.0, 1, 1, 10);
Where is x,y,z there ? i think 451 is the vehicle id ? 1.0=x? 2.0=y and 3.0=z? what is 4.0 and 1, 1, i think 10 is respawning time ?
what is 4.0 and 1, 1,?
|
It's in the same order as above.
4.0 is the angle of the car and 1, 1 are the colours. In this case it's a car model 451 on the coordinatess 1.0, 2.0, 3.0 with its nose faced to the direction 4.0. The car is fully white (1, 1) and respawns if nobody uses it for 10 seconds.
Re: VIP Cars -
ChuckyBabe - 09.03.2014
Ok thanks

)
Re: VIP Cars -
Mado - 09.03.2014
YOu're welcome, good luck with your script.