27.04.2017, 19:29
Tente assim:
PHP Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/entrar", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1219.0685,-1812.5293,16.593))
{
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062);
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 938.0220,1733.2141,8.8516))
{
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 2);
SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062);
}
}
if(strcmp(cmdtext, "/sair", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1494.325195,1304.942871,1093.289062) && GetPlayerVirtualWorld(playerid) == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1219.0685,-1812.5293,16.593);
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1494.325195,1304.942871,1093.289062) && GetPlayerVirtualWorld(playerid) == 2)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 938.0220,1733.2141,8.8516);
}
}
return 1;
}