12.08.2009, 23:33
public OnPlayerExitVehicle(playerid, vehicleid)
{
new string[256];
new sendername[MAX_PLAYER_NAME];
new newcar = GetPlayerVehicleID(playerid);
if (GetPlayerState(playerid) == 1 && !IsAPlane(newcar))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if (!IsABoat(newcar))
{
PlayerInfo[playerid][pCarEngine] = 0;
format(string, sizeof(string), "* %s stops the car engine, unfastens their seatbelt and gets out.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
}
else
{
}
if(gGas[playerid] == 1)
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~ Left car", 500, 3);
}
return 1;
}
I get no errors when I compile, but when I exit a vehicle nothing happens, the run engine command works fine though, it's just exiting the vehicle.
{
new string[256];
new sendername[MAX_PLAYER_NAME];
new newcar = GetPlayerVehicleID(playerid);
if (GetPlayerState(playerid) == 1 && !IsAPlane(newcar))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if (!IsABoat(newcar))
{
PlayerInfo[playerid][pCarEngine] = 0;
format(string, sizeof(string), "* %s stops the car engine, unfastens their seatbelt and gets out.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
}
else
{
}
if(gGas[playerid] == 1)
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~ Left car", 500, 3);
}
return 1;
}
I get no errors when I compile, but when I exit a vehicle nothing happens, the run engine command works fine though, it's just exiting the vehicle.