SA-MP Forums Archive
Why is this not giving money? Help! - 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 is this not giving money? Help! (/showthread.php?tid=206265)



Why is this not giving money? Help! - cloudysky - 03.01.2011

public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint1))
{
SetPlayerCheckpoint(playerid, Checkpoint2, 7.0);
SendClientMessage(playerid, COLOR_YELLOW, "Drop more items off at the factory.");
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint2))
{
SetPlayerCheckpoint(playerid, Checkpoint3, 7.0);
SendClientMessage(playerid, COLOR_YELLOW, "Head to the docks.");
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint3))
{
SetPlayerCheckpoint(playerid, Checkpoint4, 7.0);
SendClientMessage(playerid, COLOR_YELLOW, "Head back to the Truck Dep.");
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint4))
{
GivePlayerMoney (playerid, 1600);
SendClientMessage(playerid, COLOR_YELLOW, "You have earned $1600 for your efforts!");
SetVehicleToRespawn(1);
DisablePlayerCheckpoint(playerid);
truckjobrunning = 0;
}
}

}

(There is a couple of items missed place but that's because i copied and paste)
(This was first in scripting requests but i figured it was in the wrong area so here i am)
Anyway I am trying to get money when the player passes through the final checkpoint, but for some reason it will not give anything. This is really annoying and I would appreciate the help.


Re: Why is this not giving money? Help! - Sascha - 03.01.2011

you need to enter 3 floats instead of "checkpointX"...
if you just put that here but have the floats in your code then I have no clue what could be wrong lol


Re: Why is this not giving money? Help! - Biesmen - 03.01.2011

What source/gamemode are you using?