Helping wit onplayerentercheckpoint
#1

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??
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint
https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
https://sampwiki.blast.hk/wiki/SetPlayerPos
Reply
#3

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;

Reply
#4

what's interior??
Reply
#5

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??
Reply
#6

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;".
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)