31.07.2012, 04:45
Alguem manda esse comando pra sу usa quando tiver logado na rcon pfv?
Код:
if(strcmp(cmd, "/criaradmin", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 1337) { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode usar este comando!"); return 1; } AdmsVaga(); if(VagaSobrando == 0) { //SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparadm primeiro."); //return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /criaradmin [id] [Nivel(de 1 a 3)]"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /criaradmin [id] [Nivel(de 1 a 3)]"); return 1; } level = strval(tmp); if(level > 3001) { SendClientMessage(playerid, COLOR_GRAD1, " Nгo se pode criar um admin com nivel maior que 3001"); return true; } if(level == 0) { } GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { format(string, sizeof(string), " Vocк foi promovido a nivel %d de admin, pelo admin %s", level, sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), " Vocк promoveu %s Para admin Nivel %d", giveplayer,level); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); getdate(year, month, day); gettime(hour,minute,second); format(string, sizeof(string), "%s deu admin nivel %d para %s [%d/%d/%d] бs [%d:%d:%d].", sendername, level, giveplayer, day, month, year, hour, minute, second); PAdminsLog(string); for(new i = 0; i < sizeof(AdmInfo); i++) { if(PlayerInfo[para1][pAdmin] > 0) { PlayerInfo[para1][pAdmin] = level; break; } else if(AdmInfo[i][AdminVaga] == 0) { PlayerInfo[para1][pAdmin] = level; AdmInfo[i][gMembro] = giveplayer; AdmInfo[i][AdminVaga] = 1; //SaveAdm(); break; } } } } } return 1; }