checkpoint
#1

how can i create a checkpoint that will teleport you somewhere or open a dialog or something?
Reply
#2

Something like this should work.

You will maybe get an error, just download the "Streamer Plugin v2.5.2" and install it..
pawn Код:
new GiveGuns[MAX_PLAYERS];

public OnGameModeInit()
{
    GiveGuns = CreateDynamicCP(-103.7533, -22.6790, 1000.7188, 3.0, -1, -1, -1);
    return 1;
}

public OnPlayerEnterCheckPoint(playerid)
{
    if(GiveGuns)
    {
        GivePlayerWeapon(...);
        return 1;
    }
}
Reply
#3

That wat i was looking for thanks Unkown
Reply
#4

// In this example the player's checkpoint will be set when they spawn.
// On entering the checkpoint they will receive $1000 and the checkpoint will be disabled.

public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid,x,y,z,size of the checkpoint [example 3.0]);
return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
return 1;
}


If you need that.
Reply
#5

Sry for the duble post

if you need the teleport you need to change this:


public OnPlayerEnterCheckpoint(playerid)
{
SetPlayerPos(x,z,y);
DisablePlayerCheckpoint(playerid);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)