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; }
CMD:setadmin(playerid, params[])
{
new iD, Level, gQuery[250], pName[24], gMessage[250], gVictim[24];
if(PlayerInfo[playerid][pAdm] != 2) return SendClientMessage(playerid, 0xFF0000FF, "* Voce nao e ADM ou GM do servidor.");
if(sscanf(params, "ui", iD, Level)) return SendClientMessage(playerid, 0xFF0000FF, "* Use assim: /wayadmin [playerid] [lvl 1 a 3]");
if(iD == playerid) return SendClientMessage(playerid, 0xFF0000FF, "* Vc nao pode usar em vc mesmo ne");
if(!IsPlayerConnected(iD)) return SendClientMessage(playerid, 0xFF0000FF, "*ID NAO ENCONTRADO.");
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;
return 1;
}
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)) {
if(iD != playerid) {
if(IsPlayerConnected(iD)) {
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, "*ID NAO ENCONTRADO.");
} else SendClientMessage(playerid, 0xFF0000FF, "* Vc nao pode usar em vc mesmo ne");
} else SendClientMessage(playerid, 0xFF0000FF, "* Use assim: /setadmin [playerid] [lvl 1 a 3]");
} else SendClientMessage(playerid, 0xFF0000FF, "* Voce nao e ADM ou GM do servidor.");
return 1;
}
Sim tem minha esposa
O meu id e 0 E o id da minha esposa e 1 Tipo o comando sabe que sou adm e ela como nao e adm diz que ela nao e adm mais quando fasso o comando /setadmin 1 2 ou /setadmin 1 1 tb nao da diz que o id nao encontrado |