06.04.2014, 03:26
Код:
CMD:setadmin(playerid, params[]) { new iD, Level, gQuery[250], pName[24], gMessage[250], gVictim[24]; if(PlayerInfo[playerid][pAdm] == 2) { if(sscanf(params, "ui", iD, Level)) return SendClientMessage(playerid, 0xFF0000FF, "* Use assim: /wayadmin [playerid] [lvl 1 a 3]"); else if(iD == playerid) return SendClientMessage(playerid, 0xFF0000FF, "* Vc nao pode usar em vc mesmo ne"); else if(!IsPlayerConnected(iD)) return SendClientMessage(playerid, 0xFF0000FF, "*ID NAO ENCONTRADO."); else { GetPlayerName(playerid, pName, sizeof(pName)); GetPlayerName(iD, gVictim, sizeof(gVictim)); format(gQuery, sizeof(gQuery), "UPDATE playerdata SET adm = '%i' WHERE user = '%s'", Level, pName); mysql_query(gQuery); format(gMessage, sizeof(gMessage), "* You have set %s an admin. Level: %i", gVictim, Level); SendClientMessage(playerid, 0xFFFFFFFF, gMessage); format(gMessage, sizeof(gMessage), "* Reinicie o Jogo para Carregar o ADM ou GM no seu Personagem.", Level); SendClientMessage(playerid, 0xFFFFFFFF, gMessage); PlayerInfo[iD][pAdm] = Level; } } else { SendClientMessage(playerid, 0xFF0000FF, "* Voce nao e ADM ou GM do servidor."); } return 1; }
Por favor me ajudeee nao sei mais oq fazer ja pus outros comandos e da a mesma coisa