CheckPoint 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: CheckPoint Help (
/showthread.php?tid=529154)
CheckPoint Help -
kirostar - 31.07.2014
Hey Guys, I want to make a checkpoint in serveral places but i want it that if you enter the checkpoints it gives you score and money
Re: CheckPoint Help -
SnG.Scot_MisCuDI - 31.07.2014
If you dont already have it, download streamer:
https://sampforum.blast.hk/showthread.php?tid=102865
Streamer allows the creation of multiple checkpoints, however only one can be showing at a time.
To create a checkpoint(CP) use
pawn Код:
CP = CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, Float:drawdistance = 0.0);
Now, to call a function when you enter the CP
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid);
{
if(checkpointid == CP)
{
GivePlayerScore(playerid, score)
GivePlayerMoney(playerid, money)
}
return 1;
}
Re: CheckPoint Help -
kirostar - 31.07.2014
CreateDynamicObject or CreateDynamicCP ??
Re: CheckPoint Help -
SnG.Scot_MisCuDI - 31.07.2014
Quote:
Originally Posted by kirostar
CreateDynamicObject or CreateDynamicCP ??
|
Sorry, CreateDynamicCP
pawn Код:
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);