15.05.2014, 23:51
pawn Code:
new TPCPActive[MAX_PLAYERS]
stock CreateTPCP(playerid)
{
SetPlayerCheckPoint(playerid, x, y, z, size);
TPCPActive[playerid] = true;
}
public OnPlayerDisconnect(playerid)
{
TPCPActive[playerid] = false;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(TPCPActive[playerid] == true) {
SetPlayerPos(playerid, newx, newy, newz);
SendClientMessage(playerid, -1, "You have been teleported due to entering the TP checkpoint."); }
return 1;
}
https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint