Maks_Fender
Компетентный
PHP:
else if(strcmp(cmd, "/gtp", true) == 0)
{
new admin[256];
GetPlayerName(playerid,admin,sizeof(admin));
if (PINFO[playerid][pAdminLVL] >= 3)
{
if (!tpadmin[playerid])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
tpadmin[i] = 1;
}
PINFO[playerid][pInt] = GetPlayerInterior(playerid);
GetPlayerPos(playerid,PlX,PlY,PlZ);
GetPlayerFacingAngle(playerid,PANGLE);
format(string,sizeof(string),">> %s: Телепорт к админу, введите /gotp <<",admin);
SendClientMessageToAll(CYELLOW,string);
}
else if (tpadmin[playerid])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
tpadmin[i] = 0;
}
format(string,sizeof(string),">> %s: Телепорт закрыт<<",admin);
SendClientMessageToAll(CYELLOW,string);
}
}
}
else if(strcmp(cmd, "/gotp", true) == 0)
{
if(tpadmin[playerid] == 0)
{
SendClientMessage(playerid,CGREY,"Телепорт закрыт!");
return true;
}
PINFO[playerid][pInt] = GetPlayerInterior(playerid);
SetPlayerPos(playerid,PlX ,PlY, PlZ+2);
SetPlayerFacingAngle(playerid,PANGLE);
SetPlayerInterior(playerid,PINFO[playerid][pInt]);
SendClientMessage(playerid, CWHITE, "Вы телепортировались");
}
