CMD:amnick(playerid, params[])
{
if(ChecarPermissoes(playerid)) return 1;
if(AdmServer(playerid, 4)) return 1;
if(sscanf(params, "u", ID))
return Msg(playerid, cortag, "{A9A9A9}Use: /amnick [id]");
if(!IsPlayerConnected(ID))
return Msg(playerid, Vermelho, "Este jogador nгo estб online.");
atNome[ID] = 1;
format(String, 100, "Vocк autorizou o jogador %s a mudar de nick!", Nome(ID));
Msg(playerid, cortag, String);
format(String, 100, "Vocк foi autorizado pelo admin %s a mudar de nick!", Nome(playerid));
Msg(ID, cortag, String);
return 1;
}
A variбvel ID precisa estar dentro do comando, de preferкncia acima da condicional if(sscanf(...
|
CMD:amnick(playerid, params[])
{
if(ChecarPermissoes(playerid)) return 1;
if(AdmServer(playerid, 4)) return 1;
if(sscanf(params, "u", ID))
return Msg(playerid, cortag, "{A9A9A9}Use: /amnick [id]");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) return Msg(playerid, Vermelho, "Este jogador nгo estб online.");
}
atNome[ID] = 1;
format(String, 100, "Vocк autorizou o jogador %s a mudar de nick!", Nome(ID));
Msg(playerid, cortag, String);
format(String, 100, "Vocк foi autorizado pelo admin %s a mudar de nick!", Nome(playerid));
Msg(ID, cortag, String);
return 1;
}
CMD:amnick(playerid, params[])
{
if(ChecarPermissoes(playerid)) return 1;
if(AdmServer(playerid, 4)) return 1;
if(sscanf(params, "i", ID))
return Msg(playerid, cortag, "{A9A9A9}Use: /amnick [id]");
if(!IsPlayerConnected(ID))
return Msg(playerid, Vermelho, "Este jogador nгo estб online.");
atNome[ID] = 1;
format(String, 100, "Vocк autorizou o jogador %s a mudar de nick!", Nome(ID));
Msg(playerid, cortag, String);
format(String, 100, "Vocк foi autorizado pelo admin %s a mudar de nick!", Nome(playerid));
Msg(ID, cortag, String);
return 1;
}
CMD:amnick(playerid, params[])
{
if(ChecarPermissoes(playerid)) return 1;
if(AdmServer(playerid, 4)) return 1;
new ID;
if(sscanf(params, "u", ID))
return Msg(playerid, cortag, "{A9A9A9}Use: /amnick [id]");
if(!IsPlayerConnected(ID))
return Msg(playerid, Vermelho, "Este jogador nгo estб online.");
atNome[ID] = 1;
format(String, 100, "Vocк autorizou o jogador %s a mudar de nick!", Nome(ID));
Msg(playerid, cortag, String);
format(String, 100, "Vocк foi autorizado pelo admin %s a mudar de nick!", Nome(playerid));
Msg(ID, cortag, String);
return 1;
}