10.07.2015, 14:13
try this:
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/salir", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 933.206359, 2150.355224, 1011.023437))
{
SetPlayerPos(playerid, 2530.502197, -1664.375976, 15.166466);
SetPlayerInterior(playerid, 0);
}
return 1;
}
else if (strcmp("/entrar", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2530.567871, -1664.283691, 15.166399))
{
SetPlayerPos(playerid, 933.206359, 2150.355224, 1011.023437);
SetPlayerInterior(playerid, 1);
}
return 1;
}
else if (strcmp("/abrir1", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705))
{
GivePlayerWeapon(playerid, 22, 50);
SetPlayerSkin(playerid, 2;
}
return 1;
}
if (strcmp("/abrir2", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705))
{
GivePlayerWeapon(playerid, 23, 50);
SetPlayerSkin(playerid, 180);
}
return 1;
}
else if (strcmp("/abrir3", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 960.474548, 2097.345703, 1011.022705))
{
GivePlayerWeapon(playerid, 25, 50);
SetPlayerSkin(playerid, 29);
}
return 1;
}
}