Why is this not giving money? Help!
#1

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

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
Reply
#3

What source/gamemode are you using?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)