EAKiked
Ученик
Добрый день помогите вшить проверку на админа, чтобы администраторов не кикало и не банило
Вот код:
---------- Post added at 21:03 ---------- Previous post was at 20:53 ----------
Проперка не помогает почему то -_-
Вот код проверки
Вот код:
PHP:
else if((areaid == gAreas[arCoalmanUnload1] && GetPVarInt(playerid,"loadid") == 3) || (areaid == gAreas[arCoalmanUnload2] && GetPVarInt(playerid,"loadid") == 4) && pstate == PLAYER_STATE_ONFOOT)
{
if(pTemp[playerid][pWork] == 2 && GetPVarInt(playerid,"coalamount"))
{
if(pTemp[playerid][pShaxTime] > 0)
{
SendClientMessage(playerid,-1,"Вы были забанены по подозрению в читерстве [шахта]");
ServerBan(-1,playerid,1,"ShaxtaCheat");
}
if(IsPlayerInAnyVehicle(playerid)) return 1;
if(GetPlayerVirtualWorld(playerid) != 0) return NewKick(playerid);
RemovePlayerAttachedObject(playerid,0);
new amount = GetPVarInt(playerid,"coalamount")*2;
SetPVarInt(playerid,"coalamount",0);
new salary = amount;
GivePVarInt(playerid,"fullam",salary);
gCoalWH += amount;
new mes[128];
pData[playerid][pSalary] += salary;
UpdatePlayerData(playerid, "salary", pData[playerid][pSalary]);
SetPVarInt(playerid,"perenos",0);
format(mes,sizeof(mes),"Вы перенесли уголь.{ffffff} %d$ добавлено к вашей зарплате. Заработано:{"#cRED"} %d$",salary,GetPVarInt(playerid,"fullam"));
SendClientMessage(playerid,CWHITE,mes);
new id = RandomEx(0,2);
SetPlayerCheckpoint(playerid,gCoalManCPs[id][0],gCoalManCPs[id][1],gCoalManCPs[id][2],3.0);
SetPVarInt(playerid,"loadid",id);
ApplyAnimation(playerid,"CARRY","putdwn",2.05,1,0,0,0,900);
pTemp[playerid][pShaxTime] = 0;
---------- Post added at 21:03 ---------- Previous post was at 20:53 ----------
Проперка не помогает почему то -_-
Вот код проверки
PHP:
if(PDATA[playerid][pAdmin] == 2) return true;
