23.01.2015, 22:12
Hello,
Can I SetPlayerPos at exit checkpoint ?
I think I can't set the player pos at exit checkpoint while other gamemode can ..
I want something like when player enter entrance checkpoint then the player will spawn in the round of checkpoint. If i'm Set the player pos to exit checkpoint it will be go back to entrance checkpoint and loop each other.
See here what i mean.
Can I SetPlayerPos at exit checkpoint ?
I think I can't set the player pos at exit checkpoint while other gamemode can ..
I want something like when player enter entrance checkpoint then the player will spawn in the round of checkpoint. If i'm Set the player pos to exit checkpoint it will be go back to entrance checkpoint and loop each other.
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == h[1])//Enter
{
SetPlayerPos(playerid, 238.727615, 138.634033, 1003.023437);
SetPlayerFacingAngle(playerid, 0);
SetPlayerInterior(playerid, 3);
}
if(checkpointid == h[2]) //Exit
{
SetPlayerPos(playerid, 2287.032958, 2432.367187, 10.820312);
SetPlayerFacingAngle(playerid, 0);
SetPlayerInterior(playerid, 0);
}
return 1;
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(checkpointid == h[1])//Enter
{
}
if(checkpointid == h[2]) //Exit
{
}
return 1;
}
See here what i mean.