08.05.2011, 17:05
Olб tenho um comando de trazer os players mais quero um de trazer players somente da profissгo do exercito ! como faзo ? Enum [pEX] e Loop levelex
Grato desde jб!
Grato desde jб!
Код:
if(strcmp(cmd, "/trazer", true) == 0 || strcmp(cmd, "/tr", true) == 0) { GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level"); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREEN, "Uso correto: /trazer [id do player]"); return 1; } new Float:plocx,Float:plocy,Float:plocz; giveplayerid = strval(tmp); if(logged[playerid] == 1) { if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pBOPE] >= 3 || PlayerInfo[playerid][pEX] >= 3 || PlayerInfo[playerid][pCV] >= 3 || PlayerInfo[playerid][pADA] >= 3 || PlayerInfo[playerid][pTCP] >= 3 || PlayerInfo[playerid][pVIP] >= 1 || PlayerInfo[playerid][pPCC] >= 3 || PlayerInfo[playerid][pRRB] >= 1 || PlayerInfo[playerid][pGOE] >= 3 || PlayerInfo[playerid][pPM] >= 3 || PlayerInfo[playerid][pEX] >= 3) { for(new i = 0; i < MAX_PLAYERS; i ++) if(IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Adm.Cmd: %s trouxe o jogador %s(%i)", sendername, giveplayer, giveplayerid); SendClientMessage(i, COLOR_ADM, string); GetPlayerPos(playerid, plocx, plocy, plocz); new intid = GetPlayerInterior(playerid); SetPlayerInterior(giveplayerid,intid); if (GetPlayerState(giveplayerid) == 2) { new tmpcar = GetPlayerVehicleID(giveplayerid); SetVehiclePos(tmpcar, plocx, plocy+4, plocz); } else { SetPlayerPos(giveplayerid,plocx,plocy+2, plocz); } } else { } } else { SendClientMessage(playerid, COLOR_CYAN, "Vocк nгo й um Admin para usar esse comando!"); } } else { SendClientMessage(playerid, COLOR_CYAN, "Vocк tem que estar logado para usar este comando!"); } return 1; }