22.08.2015, 16:53
Olha, estava tudo normal o comando й /criaradmin, eu tava digitando normal ai pegava e promovia corremente, sу que agora eu dou /criaradmin e o samp-server fecha sozinho.
Ao copilar nгo dб nenhum erro no GM.
Ao copilar nгo dб nenhum erro no GM.
Код HTML:
//============================================================================== if(strcmp(cmd, "/criaradmin", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 1341) { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse 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]"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /criaradmin [id] [Nivel]"); return 1; } level = strval(tmp); if(level == 0) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparadmin para limpar uma vaga"); return 1; } GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if(PlayerInfo[para1][pAdmin] >= 1342) { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode promover um Admin Dono!"); format(string, sizeof(string), "O admin %s tentou te promover a nivel %d",sendername ,level); SendClientMessage(para1, COLOR_AZULBB, string); return 1; } format(string, sizeof(string), " Vocк foi promovido para nivel %d de Administrador,pelo admin %s", level, sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), " Vocк promoveu o(a) %s Para o nivel %d de Admin.", 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; }[/QUOTE] /admins [QUOTE]//>-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= if (strcmp(cmd, "/admins", true) == 0) { SendClientMessage(playerid, 0xFF00BFFF, "Administradores Online:"); for(new i = 0; i <= MAX_PLAYERS; i++) { if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] > 0) { if(admhide[i] == 0) { GetPlayerName(i, sendername, sizeof(sendername)); new lolz[20]; if(PlayerInfo[i][pAdmin] == 1) { lolz = "TEMPORБRIO"; } if(PlayerInfo[i][pAdmin] == 2) { lolz = "Admin: Nivel: 2"; } if(PlayerInfo[i][pAdmin] == 3) { lolz = "Admin: Nivel: 3"; } if(PlayerInfo[i][pAdmin] == 4) { lolz = "Admin: Nivel: 4"; } if(PlayerInfo[i][pAdmin] == 1337) { lolz = "MASTER"; } if(PlayerInfo[i][pAdmin] == 1338) { lolz = "GERENTE"; } if(PlayerInfo[i][pAdmin] == 1340) { lolz = "SUB-DONO"; } if(PlayerInfo[i][pAdmin] == 3001) { lolz = "DONO"; } if(away[i] == 0) { if(admtrampando[i] == 1) { format(string, 128, "Admin: %s Nivel: [%s]", sendername, lolz); SendClientMessage(playerid, COLOR_GRAD2, string); } else { format(string, 128, "Admin: %s Nivel: [%s] [Jogando]", sendername, lolz); SendClientMessage(playerid, COLOR_GRAD2, string); } } } } } return true; } //>-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=