15.01.2016, 23:05
oque tem de errado? ta bugando nгo esta executando a mudanзa de nick
Код:
if(strcmp(cmd,"/onmudarnick",true)==0) { if(IsPlayerConnected(playerid)) { if(AdminTrabalhando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1340 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341) { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /onmudarnick [ id ]"); return 1; } new playa; playa = ReturnUser(tmp); if (PlayerInfo[playerid][pAdmin] >= 1337) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { PodeMudarNick[playa] = 1; GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "Admin %s: Autorizou vocк a mudar o nick, digite /mudarnick.", sendername); SendClientMessage(playa, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "ADMIN CMD: %s autorizou %s a mudar o nick !",sendername,giveplayer); ABroadCast(COLOR_LIGHTRED,string,1); } } } else { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar este comando!"); return 1; } } return 1; } if(strcmp(cmd, "/offmudarnick", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1337) { if(AdminTrabalhando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1340 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341) { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /offmudarsenha [id]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { PodeMudarNick[giveplayerid] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "Admin %s : Tirou sua permissгo para mudar de nick.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "ADMIN CMD: %s tirou a permissгo de %s para mudar o nick !",sendername,giveplayer); ABroadCast(COLOR_LIGHTRED,string,1); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "O Jogador Estб Offline !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб autorizado a usar este comando !"); return 1; } } return 1; }