Job 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)
+--- Thread: Job help? (
/showthread.php?tid=380270)
Job help? -
jueix - 24.09.2012
Ok, So i made a job and when a player enters the first checkpoint then goes to the next it dosn't let him load the last. heres my pawno code.
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(PlayerInfo[playerid][pJob] == 3 && PlayerInfo[playerid][pCheckPoint] == 1)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 1362.2135, -1658.5692, 13.4981 , 3.0);
PlayerInfo[playerid][pCheckPoint] = 2;
}
if(PlayerInfo[playerid][pJob] == 3 && PlayerInfo[playerid][pCheckPoint] == 2 && IsPlayerInRangeOfPoint(playerid, 2.0, 1362.2135, -1658.5692, 13.4981))
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2470.6523,-2089.7607,13.6471, 3.0);
PlayerInfo[playerid][pCheckPoint] = 3;
}
if(PlayerInfo[playerid][pJob] == 3 && PlayerInfo[playerid][pCheckPoint] == 3 && IsPlayerInRangeOfPoint(playerid, 2.0, 2470.6523,-2089.7607,13.6471))
{
new string[128];
DisablePlayerCheckpoint(playerid);
PlayerInfo[playerid][pCheckPoint] = 0;
PlayerInfo[playerid][pCheck] = PlayerInfo[playerid][pCheck] +500;
format(string, sizeof(string), "You now have a total of %d in cheques. Go cash them at the bank.", PlayerInfo[playerid][pCheck]);
SendClientMessage(playerid, COLOR_GREEN, string);
}
return 1;
}
Ok so this script works if ur using teleport hacks but if not it dosn't work.
When i use it with out isplayerinrangeofpoint it dosn't load it up it gives all the things under one.
Re: Job help? -
jueix - 25.09.2012
Any one?
Re : Job help? -
Varkoll_ - 25.09.2012
IsPlayerInRangeOfPoint(playerid,
2.0
It's inferior to your checkpoint size...
(sorry for my bad english)
Re: Job help? -
Vince - 25.09.2012
Remove the point check and just add
returns or use
else if.