SA-MP Forums Archive
[HELP]Sidejobs - 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: [HELP]Sidejobs (/showthread.php?tid=227324)



[HELP]Sidejobs - [BKR]LUCAGRABACR - 17.02.2011

So, i'm trying to create a mailman sidejob in my server, the idea is if someone enter a securicar, then some checkpoints will created and the player must follow the checkpoints, and in the last checkpoint he will get the cash.

but the problem is, how to make the checkpoints correctly?.

I try this
Код:
if(IsPlayerInVehicle(playerid,428))
{
	SendClientMessage(playerid,COLOR_RED,"You are currently doing mailman job, follow the checkpoint to complete the job");
	SetPlayerCheckPoint(playerid,844.5125,-1044.1566,25.4438,3.0);
	}
but then how to make if the player enter that checkpoint, then another checkpoint will be created?. please help i'm not that good in pawno.

Thanks in advance.


Re: [HELP]Sidejobs - SmugglesJr - 17.02.2011

pawn Код:
if(IsPlayerInVehicle(playerid,428))
{
    SendClientMessage(playerid,COLOR_RED,"You are currently doing mailman job, follow the checkpoint to complete the job");
    SetPlayerCheckPoint(playerid,844.5125,-1044.1566,25.4438,3.0);
}



Re: [HELP]Sidejobs - Black_Sun1 - 17.02.2011

OnPlayerCommandText or OnPlayerEnterVehicle or OnPlayerKeyStateChange?
whats the function? maybe i can script this little job for you


Re: [HELP]Sidejobs - Black_Sun1 - 17.02.2011

here got it...
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(IsPlayerInVehicle(playerid,428))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 844.5125,-1044.1566,25.4438))
        {
            DisablePlayerCheckpoint(playerid);
            SendClientMessage(playerid,/*put your color here*/, "Great, now hit to the next checkpoint!");
            SetPlayerCheckpoint(playerid,/*x*/,/*y*/,/*z*/,3.0);//coordinates of the next checkpoint..
        }
    }
    return 1;
}
hope it helps =D