16.01.2015, 19:23
In my old gm, which was as follows:
And onplayerleavedynamiccp
only now, better want my code to do less lines
the function of this is that it can appear inside the checkpoint without being teleported again, not having to set the coordinates to go outside the checkpoint
sorry for my english
pawn Код:
if(checkpointid == SkinSEnt)
{
if(SpawnCP[playerid] == 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 45);
SetPlayerPos(playerid, 207.0771, -140.1690, 1003.5078);
SetPlayerFacingAngle(playerid, 360);
SetCameraBehindPlayer(playerid);
CargarObjetos(playerid);
SpawnCP2[playerid] = 1;
}
return 1;
}
}
else if(checkpointid == SkinSExit)
{
if(SpawnCP2[playerid] == 0)
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, -1980.7328, 93.5556, 27.6875);
SetPlayerFacingAngle(playerid, 85);
SetCameraBehindPlayer(playerid);
CargarObjetos(playerid);
SpawnCP[playerid] = 1;
return 1;
}
}
pawn Код:
if(checkpointid == SkinSEnt)
{
SpawnCP[playerid] = 0;
return 1;
}
if(checkpointid == SkinSExit)
{
SpawnCP2[playerid] = 0;
return 1;
}
the function of this is that it can appear inside the checkpoint without being teleported again, not having to set the coordinates to go outside the checkpoint
sorry for my english