SA-MP Forums Archive
Why doesn't this work? :( - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Why doesn't this work? :( (/showthread.php?tid=91154)



Why doesn't this work? :( - BugsY - 12.08.2009

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.


Re: Why doesn't this work? :( - James_Alex - 12.08.2009

so what's the probleme exactly with this ?


Re: Why doesn't this work? :( - BugsY - 12.08.2009

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.


Re: Why doesn't this work? :( - BugsY - 12.08.2009

Anyone?


Re: Why doesn't this work? :( - BugsY - 13.08.2009

...


Re: Why doesn't this work? :( - retart441 - 13.08.2009

Fail bump is fail.

You sir need to work on your indentations.


Re: Why doesn't this work? :( - BDup23 - 13.08.2009

LOL!!


Re: Why doesn't this work? :( - BugsY - 13.08.2009

http://pastebin.com/m43d98380

better?