[Ajuda] Alterar Permissгo de Comando
#1

Galera queria colocar para sу adm level 6 usasse esse comando:

pawn Код:
CMD:despejar(playerid, params[])
{
    if (GetPlayerVehicleSeat(playerid) != -1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}[ERRO] {009D4F}Vocк nгo pode usar esta comando dentro de um veнculo");
    if(CallRemoteFunction("PegarLevel","i",playerid) < 5) return SendClientMessage(playerid, -1, "{FF0000}[ERRO]: Vocк nгo tem permissгo para isso!");
    if (APlayerData[playerid][LoggedIn] != true) return SendClientMessage(playerid, -1, "{FFFF00}[ERRO] {009D4F}Vocк nгo estб logado!");
    new Msg[128], Name[24], AdminName[24];
    GetPlayerName(playerid, AdminName, sizeof(AdminName));
    for (new HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
    {
        if (IsValidDynamicPickup(AHouseData[HouseID][PickupID]))
        {
            if (IsPlayerInRangeOfPoint(playerid, 2.5, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ]))
            {
                if (AHouseData[HouseID][Owned] == true)
                {
                    for (new pid; pid < MAX_PLAYERS; pid++)
                    {
                        GetPlayerName(pid, Name, sizeof(Name));
                        if (strcmp(AHouseData[HouseID][Owner], Name, false) == 0)
                        {
                            format(Msg, 128, "{FF0000}Vocк perdeu sua casa {FFFF00}\"%s\"{FF0000}, foi despejado", AHouseData[HouseID][HouseName]);
                            SendClientMessage(pid, 0xFFFFFFFF, Msg);
                            for (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++)
                            if (APlayerData[pid][Houses][HouseSlot] == HouseID)
                            APlayerData[pid][Houses][HouseSlot] = 0;
                            break;
                        }
                    }
                }
                format(Msg, 128, "{FF0000}%s despejou a casa %s [ID: %i] do player %s", AdminName, AHouseData[HouseID][HouseName], HouseID, AHouseData[HouseID][Owner]);
                House_RemoveVehicles(HouseID);
                AHouseData[HouseID][Owned] = false;
                AHouseData[HouseID][Owner] = 0;
                House_UpdateEntrance(HouseID);
                HouseFile_Save(HouseID);
                format(Msg, 128, "{00FF00}Vocк despejou a casa ID: {FFFF00}%i", HouseID);
                SendClientMessage(playerid, 0xFFFFFFFF, Msg);

                return 1;
            }
        }
    }
    SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}[ERRO] {009D4F}Vocк deve estar emcima da pickup da casa");
    return 1;
}
Ja tentei usar essas linhas:

pawn Код:
if(CallRemoteFunction("PegarLevel","i",playerid) >= 6) return SendClientMessage(playerid, -1, "{FF0000}[ERRO]: Vocк nгo tem permissгo para isso!");
pawn Код:
if (APlayerData[playerid][PlayerLevel] >= 6) return SendClientMessage(playerid, -1, "{FF0000}[ERRO]: Vocк nгo tem permissгo para isso!");
Reply


Messages In This Thread
Alterar Permissгo de Comando - by ThiagoMK - 16.06.2013, 20:49
Re: Alterar Permissгo de Comando - by -GooGle- - 16.06.2013, 20:52
Re: Alterar Permissгo de Comando - by smiiir - 16.06.2013, 20:53
Re: Alterar Permissгo de Comando - by Mteck - 16.06.2013, 20:55
Re : Re: Alterar Permissгo de Comando - by ThiagoMK - 16.06.2013, 20:55
Re: Re : Re: Alterar Permissгo de Comando - by -GooGle- - 16.06.2013, 20:57
Re : Re: Alterar Permissгo de Comando - by ThiagoMK - 16.06.2013, 20:58
Re: Re : Re: Alterar Permissгo de Comando - by Mteck - 16.06.2013, 20:59
Re : Alterar Permissгo de Comando - by ThiagoMK - 16.06.2013, 21:04
Re: Re : Alterar Permissгo de Comando - by smiiir - 16.06.2013, 21:09

Forum Jump:


Users browsing this thread: 1 Guest(s)