SA-MP Forums Archive
Helping wit onplayerentercheckpoint - 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: Helping wit onplayerentercheckpoint (/showthread.php?tid=385072)



Helping wit onplayerentercheckpoint - Mustafa6155 - 14.10.2012

Hello guys can u help me with how make an marker if u enter it u will go to city hall or police or medic??


Re: Helping wit onplayerentercheckpoint - Stigg - 14.10.2012

https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint
https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
https://sampwiki.blast.hk/wiki/SetPlayerPos


Re: Helping wit onplayerentercheckpoint - newbienoob - 14.10.2012

1) Create a pickup (https://sampwiki.blast.hk/wiki/CreatePickup)
2) Under OnPlayerPickUpPickup, use SetPlayerPos and SetPlayerInterior to set player's pos and player's interior.
Example:
PHP код:
new pickup//at the top. 
//Under OnGameModeInit()
pickup CreatePickup(modeltypeFloat:XFloat:YFloat:ZVirtualworld);
//Under OnPlayerPickUpPickup
if(pickupid == pickup//If they pickup a pickup that you have created, then
{
    
SetPlayerPos(playerid,x,y,z); //Set their position
    
SetPlayerInterior(playerid,interior); //Set their interior
    
return 1;




Re: Helping wit onplayerentercheckpoint - Mustafa6155 - 14.10.2012

what's interior??


Re: Helping wit onplayerentercheckpoint - Mustafa6155 - 14.10.2012

I got an warn!
Quote:

C:\Users\Mustafa\Desktop\Gta server\gamemodes\mygamemodemp.pwn(264) : warning 209: function "Streamer_OnPlayerPickUpPickup" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

What to do??


Re: Helping wit onplayerentercheckpoint - gtakillerIV - 14.10.2012

Return 1.

Ex:

PHP код:
CMD:gate(playerid,params[])
{
    if(
IsPlayerInRangeOfPoint(playerid82096.35131279.202911.4749))
    {
          
SendClientMessage(playeridLime"Use /password [Gate Password] to open the gate!");
          
passwordtrue=1;
    }
    return 
1;

You didin't add this part "return 1;".