craeting check point - 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: craeting check point (
/showthread.php?tid=242770)
craeting check point -
[ProX]BlueFire - 20.03.2011
can sombody create a teleport checkpoint for me?(but with a cmd, like when u enter the dcp it will say:"type /enter to enter the build,and if he is not in the check point and he type /enter it will say:"you are not near the checkpoint")
dynamicCheckPoint Cordis:2212.830078125, 2048.8022460938, 9.6160545349121
when u enter the checkpoint and type /enter it tele u to this cordis:1415.951171,-988.971191,1639.980224
(the same will be when ur back)
and can u explane me how do i make when the player has entered the check point it will show/open him a dialog?(it will automatic show him the dialog)
thx for helpers =D
Re: craeting check point -
Stigg - 20.03.2011
https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint
https://sampwiki.blast.hk/wiki/SetPlayerPos
Re: craeting check point -
tanush - 20.03.2011
You want dynamicCP or normal?
Re: craeting check point -
[ProX]BlueFire - 20.03.2011
a pickup better =D
Re: craeting check point -
Stigg - 20.03.2011
Quote:
Originally Posted by [ProX]BlueFire
a pickup better =D
|
Tell us why a pickup is better ?
Re: craeting check point -
[ProX]BlueFire - 20.03.2011
caz if i will make a cp it will show on the map and it would be a pick up it will look cool and will not show on the map
(pickup will be a doller plz!! xD)
Re: craeting check point -
Stigg - 20.03.2011
Quote:
Originally Posted by [ProX]BlueFire
caz if i will make a cp it will show on the map and it would be a pick up it will look cool and will not show on the map
|
You asked for a checkpoint. Change your post.
Re: craeting check point -
tanush - 20.03.2011
Ughs how about CreateDynamicCP?? it wont show on map
Re: craeting check point -
[ProX]BlueFire - 20.03.2011
lol k
AW: craeting check point -
Pablo Borsellino - 20.03.2011
You want have a port Pickup?
At the top of the Script:
OnGameModeInit
pawn Код:
Pickupname[0]=CreatePickup(1274,23,2212.830078,2048.802246,9.616054534,-1);
Pickupname[1]=CreatePickup(1274,23,1415.951171,-988.971191,1639.980224,-1);
The first number is the Pickupmodel, you can find some Pickupmodels »here«
OnGameModeExit
pawn Код:
DestroyPickup(Pickupname[0]);
DestroyPickup(Pickupname[1]);
OnPlayerPickUpPickup
pawn Код:
if(pickupid==Pickupname[0])
{
SendClientMessage(playerid,0xAFAFAFFF,"type /enter to enter the build");
}else if(pickupid==Pickupname[1]){
SendClientMessage(playerid,0xAFAFAFFF,"type /exit to exitthe build");
}
In your /enter Command
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,5,1415.951171,-988.971191,1639.980224)
SetPlayerPos(playerid,2212.830078,2048.802246,9.616054534);
else SendClientMessage(playerid,0xAFAFAFFF,"you are not near the checkpoint");
In your /exit Command
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,5,12212.830078,2048.802246,9.616054534)
SetPlayerPos(playerid,1415.951171,-988.971191,1639.980224);
else SendClientMessage(playerid,0xAFAFAFFF,"you are not near the checkpoint");
And with Dialog, you use only ShowPlayerDialog on OnPlayerPickUpPickup