Checkpoint Teleport another player
#1

public OnPlayerEnterCheckpoint(playerid)
{
switch(getCheckpointType(playerid))
{
case CP_V1: {
for(new i;i<MAX_PLAYERS;i++)
if( GetPlayerTeam(playerid) == v1 )
{
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid,369.3559,-194.6116,1044.2200);
}
}
}
return 1;
}

Mode, which creates hit the wall
I want to teleport to another player, not in his own radius
What's the problem Is there a function that can teleport to another player designated place
Teleport other specific person
Reply
#2

U want if playerid enter checkpoint teleport to i ?
So change it to :
GetPlayerPos(i, x, y, z);
SetPlayerPos(playerid, x+2, y+2, z+2);
Reply
#3

Good code, thank you
The full range of tests was able to escape

public OnPlayerEnterCheckpoint(playerid)
{
switch(getCheckpointType(playerid))
{
case CP_V1: {
for(new i;i<MAX_PLAYERS;i++)
if( GetPlayerTeam(playerid) == v1 )
if(IsPlayerInRangeOfPoint(playerid,500,381.7581,-193.8507,1044.2200))
{
new Float, Float:y, Float:z;
GetPlayerPos(i, x, y, z);
SetPlayerPos(i,-2195.8057,-7791.4160,18.7144);
SetPlayerInterior(playerid, 0);
}
}
}
return 1;
}
Reply
#4

for(new i = 0; i<MAX_PLAYERS;i++)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)