20.12.2014, 23:41
(
Последний раз редактировалось danielpalade; 21.12.2014 в 02:57.
)
So, I am trying to make the commands /enter and /exit to make a player exit and enter the spawn.
But for some reason the player won't spawn outside or inside, it just stays in the same position.
This is my code:
But for some reason the player won't spawn outside or inside, it just stays in the same position.
This is my code:
Код:
CMD:enter(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1685.0341,-1343.4779,17.4349))
{
if(pInfo[playerid][Sex] == 1)
{
SetSpawnInfo(playerid, 0, 3, 161.4045, -95.8079, 1001.8047, 347.3583, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid, 18);
SpawnPlayer(playerid);
}
if(pInfo[playerid][Sex] == 2)
{
SetSpawnInfo(playerid, 0, 11, 161.4045, -95.8079, 1001.8047, 347.3583, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid, 18);
SpawnPlayer(playerid);
}
}
return 1;
}
CMD:exit(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 161.4045, -95.8079, 1001.8047))
{
if(pInfo[playerid][Sex] == 1)
{
SetSpawnInfo(playerid, 0, 3, 1685.0341, -1343.4779, 17.4349, 274.0744, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid, 0);
SpawnPlayer(playerid);
}
if(pInfo[playerid][Sex] == 2)
{
SetSpawnInfo(playerid, 0, 11, 1685.0341, -1343.4779, 17.4349, 274.0744, 0, 0, 0, 0, 0, 0);
SetPlayerInterior(playerid, 0);
SpawnPlayer(playerid);
}
}
return 1;
}


