/work and /stopwork - 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: /work and /stopwork (
/showthread.php?tid=425018)
/work and /stopwork -
Avi Raj - 24.03.2013
Hey Guys,
i need small help.
can anyone show me an example for /work and /stopwork cmd?
With only 1 Mission?
im making mission with Plane :- Dodo.
Anyone?
Please.
Re: /work and /stopwork -
vitorvlv - 24.03.2013
Example working with Checkpoints:
pawn Код:
new CP[MAX_PLAYERS];
COMMAND:work(playerid, params[])
{
CP[playerid] =1; // this sets the checkpoint id
SetPlayerCheckpoint(playerid, 1577.3411,1504.8600,10.5608, 4.0); //LV Airport ||Note: 4.0 is the checkpoint size
SendClientMessage(playerid,COLOR_WHITE,"Deliver the damaged passengers from LVAP to SFAP"); // we send the message to the player which we give him info where to go
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if (CP[playerid] ==1)
{
DisablePlayerCheckpoint(playerid); // disables his checkpoint since he/she reached it
SendClientMessage(playerid,COLOR_WHITE"You got 15000$ for transferring the damaged passengers from LVAP to SFAP"); // We send the message again
GivePlayerMoney(playerid, +15000); // we give him 15k for his work(i think you dont want to make him rich :P)
}
return 1;
}
CMD:stopwork(playerid, params[])
{
DisablePlayerCheckpoint(playerid); // This fuction here disables the player checkpoint (ANY CHECKPOINT)
SendClientMessage(playerid, COLOR_WHITE, "You lost 1000$ for aborting a mission");
GivePlayerMoney(playerid, -1000); // We are getting his money
return 1;
}
https://sampforum.blast.hk/showthread.php?tid=306615
Re: /work and /stopwork -
Avi Raj - 24.03.2013
dude, i need for plane but they start from without vehicle and i need missions with 2 checkpoints.
Load checkpoint and Unload checkpoint.