11.01.2018, 21:52
#include <a_samp>
#include <gl_common.inc>
new Admin[MAX_PLAYERS];
#include <gl_common.inc>
new Admin[MAX_PLAYERS];
PHP Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
new tmp[256], cmd[256], idx;
if(strcmp(cmd, "/setar", true) == 0)
{
if(Admin[playerid] == 1)
{
new gstring[256];
new Recebeu[256];
new id = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, -1, "| ERRO | Digite: /Setar [Id da Pessoa]");
return 1;
}
Admin[id] = 1;
format(gstring, sizeof(gstring), "| SETAR | Vocк setou ao jogador %s Admin!", id);
SendClientMessage(playerid, -1, gstring);
format(Recebeu, sizeof(Recebeu), "| MEGASENA | Vocк ganhou admin do Ademir %s", playerid);
SendClientMessage(id, -1, Recebeu);
}
else
{
SendClientMessage(playerid, -1, "| ERRO | Tu nгo й admin Nгo Safado KKK");
return 1;
}
}
return 0;
}