if(strcmp(cmd, "/entrarbar", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, -1672.3641,13.5469,272.1575))
{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo estб no ponto de entrada do bar!");
return 1;
}
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 0)
{
if(admtrampando[playerid] < 0)
{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo estб trabalhando! (/profadmin)");
return 1;
}
if (GetPlayerState(playerid) == 2)
{
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1491.5988,-1651.8672,-83.4489);
}
GameTextForPlayer(playerid, "~w~Bar de ~p~Strip", 5000, 6);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Voce nгo estб autorizado a usar o comando!");
}
}
return 1;
}
//-----------------------------------
if(strcmp(cmd, "/sairbar", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, -1651.8672,-83.4489,94.0375))
{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo estб no ponto de saida do bar!");
return 1;
}
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 0)
{
if(admtrampando[playerid] < 0)
{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo estб trabalhando! (/profadmin)");
return 1;
}
if (GetPlayerState(playerid) == 2)
{
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1523.4249,-1672.3641,13.5469);
}
GameTextForPlayer(playerid, "~w~Los Santos", 5000, 6);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Voce nгo estб autorizado a usar o comando!");
}
}
return 1;
}
if(strcmp(cmd, "/entrarbar", true) == 0) e if(strcmp(cmd, "/sairbar", true) == 0)
if(IsPlayerInRangeOfPoint(playerid, 2.0, -1672.3641,13.5469,272.1575))// pelo PlayerToPoint
if(PlayerToPoint(10.0,playerid,-1672.3641,13.5469,272.1575))
Troque o
pawn Код:
|
O ъnico problema dele й que eu coloquei nos dois ,IsPlayerInRangeOfPoint para o comando sу pegar em um lugar, troquei por PlayerToPoint, mais o comando continua liberado para se teleportar de qualquer lugar, me ajudem ae
if(!IsPlayerInRangeOfPoint(playerid, 2.0, -1651.8672,-83.4489,94.0375))
if(strcmp(cmd, "/entrarbar", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 2.0, -1672.3641,13.5469,272.1575))
{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo estб no ponto de entrada do bar!");
return 1;
}
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 0)
{
if(admtrampando[playerid] < 0)
{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo estб trabalhando! (/profadmin)");
return 1;
}
if (GetPlayerState(playerid) == 2)
{
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1491.5988,-1651.8672,-83.4489);
}
GameTextForPlayer(playerid, "~w~Bar de ~p~Strip", 5000, 6);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Voce nгo estб autorizado a usar o comando!");
}
}
return 1;
}
//-----------------------------------
if(strcmp(cmd, "/sairbar", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, -1651.8672,-83.4489,94.0375))
{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo estб no ponto de saida do bar!");
return 1;
}
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 0)
{
if(admtrampando[playerid] < 0)
{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo estб trabalhando! (/profadmin)");
return 1;
}
if (GetPlayerState(playerid) == 2)
{
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1523.4249,-1672.3641,13.5469);
}
GameTextForPlayer(playerid, "~w~Los Santos", 5000, 6);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Voce nгo estб autorizado a usar o comando!");
}
}
return 1;
}