Help from this .. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help from this .. (
/showthread.php?tid=505527)
Help from this .. -
ChuckyBabe - 08.04.2014
Can anyone convert this into a
Here's the code
pawn Код:
#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;
}
Here's the code going to convert
pawn Код:
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;
}
EDIT: because
pawn Код:
RemovePlayerFromVehicle(playerid);
is not working in OnPlayerEnterVehicle so i want to convert it..
i will give +rep
Re: Help from this .. -
Jefff - 08.04.2014
Replace RemovePlayerFromVehicle to ClearAnimations
Re: Help from this .. -
ChuckyBabe - 08.04.2014
Ok i will try