16.06.2013, 20:49
Galera queria colocar para sу adm level 6 usasse esse comando:
Ja tentei usar essas linhas:
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;
}
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!");