Why doesn't this work? :(
#1

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.
Reply
#2

so what's the probleme exactly with this ?
Reply
#3

Well I made a /engine command so if you enter a vehicle it freezes you and asks you to start the engine, then when you type /engine it unfreezes you so you can drive, but I want it to say the action I posted and reset the CarEngine to 0 everytime someone exits their vehicle, everything else works fine except when exiting.
Reply
#4

Anyone?
Reply
#5

...
Reply
#6

Fail bump is fail.

You sir need to work on your indentations.
Reply
#7

LOL!!
Reply
#8

http://pastebin.com/m43d98380

better?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)