COMMAND:daradmin(playerid, params[])
{
if(PlayerInfo[playerid][Admin] <1) return SendClientMessage(playerid, -1, "Vocк nгo tem permissгo para ъtilizar esse comando.");
if(ModoAdmin[playerid] == 0) return SendClientMessage(playerid, -1, "Vocк nгo estб trabalhando (/modoadmin).");
if(!sscanf(params, "ud", id, numero)) return SendClientMessage(playerid, -1, "USE: /daradmin [id] [level].");
if(numero > 0 || numero < 6) return SendClientMessage(playerid, -1, "Use nъmeros entre (0-5).");
PlayerInfo[id][Admin] = numero;
return 1;
}
COMMAND:daradmin(playerid, params[])
{
if(PlayerInfo[playerid][Admin] < 1)
return SendClientMessage(playerid, -1, "Vocк nгo tem permissгo para ъtilizar esse comando.");
if(ModoAdmin[playerid] == 0)
return SendClientMessage(playerid, -1, "Vocк nгo estб trabalhando (/modoadmin).");
if(!sscanf(params, "ud", id, numero))
return SendClientMessage(playerid, -1, "USE: /daradmin [id] [level].");
if(numero > 0 || numero < 6) return SendClientMessage(playerid, -1, "Use nъmeros entre (0-5).");
PlayerInfo[id][Admin] = numero;
return 1;
}
error 017: undefined symbol "id"
error 017: undefined symbol "numero"
error 017: undefined symbol "id"
CMD:daradmin(playerid,params[])
{
new PlayerB,LVL; // defines de PlayerB, e LVL
if(PlayerInfo[playerid][pAdmin] >= 1)//Variavel de admin)
{
if(sscanf(params,"ui",PlayerB,LVL)) // Aqui ele transforma LVL em intiger, PlayerB, em user..
{
SendClientMessage(playerid,-1,"USE: /daradmin [id][lvl]");
return 1;
}
PlayerInfo[PlayerB][pAdmin] = LVL; // aqui й o resto do CMD
return 1;
}
return 1;
}
COMMAND:daradmin(playerid, params[])
{
if(PlayerInfo[playerid][Admin] < 1)
return SendClientMessage(playerid, -1, "Vocк nгo tem permissгo para ъtilizar esse comando.");
if(ModoAdmin[playerid] == 0)
return SendClientMessage(playerid, -1, "Vocк nгo estб trabalhando (/modoadmin).");
new id, numero;
if(!sscanf(params, "ud", id, numero))
return SendClientMessage(playerid, -1, "USE: /daradmin [id] [level].");
if(numero > 0 || numero < 6) return SendClientMessage(playerid, -1, "Use nъmeros entre (0-5).");
PlayerInfo[id][Admin] = numero;
return 1;
}
if(strcmp(cmd, "/daradmin", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /daradmin [ID/ParteDoNick] [level(1-4000)]"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); level = strval(tmp); if(PlayerInfo[playerid][pAdmin] == 6357) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pAdmin] = level; printf("AdmCmd: Um Fundador promoveu %s para Administrador Level %d .", sendername, giveplayer, level); format(string, sizeof(string), "Vocк foi promovido a Administrador Level %d por Admin Bot", level, sendername); SendClientMessage(para1, COLOR_YELLOW, string); format(string, sizeof(string), "Vocк promoveu %s para Administrador Level %d .", giveplayer,level); SendClientMessage(playerid, COLOR_YELLOW, string); } } } else { SendClientMessage(playerid, COLOR_GRAD1, " vocк nгo estб autorizado a usar esse comando !"); } } return 1; }
Tem esse meu tb
Код:
if(strcmp(cmd, "/daradmin", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /daradmin [ID/ParteDoNick] [level(1-4000)]"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); level = strval(tmp); if(PlayerInfo[playerid][pAdmin] == 6357) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pAdmin] = level; printf("AdmCmd: Um Fundador promoveu %s para Administrador Level %d .", sendername, giveplayer, level); format(string, sizeof(string), "Vocк foi promovido a Administrador Level %d por Admin Bot", level, sendername); SendClientMessage(para1, COLOR_YELLOW, string); format(string, sizeof(string), "Vocк promoveu %s para Administrador Level %d .", giveplayer,level); SendClientMessage(playerid, COLOR_YELLOW, string); } } } else { SendClientMessage(playerid, COLOR_GRAD1, " vocк nгo estб autorizado a usar esse comando !"); } } return 1; } |