[Ajuda] o Que tem de errado ?
#1

Код:
if(strcmp("/setadmin", cmdtext, true) == 0)
{
    new id, level, string[256], string2[256], ganhou[MAX_PLAYER_NAME], deu[MAX_PLAYER_NAME];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD0000AA, "{00E5FF}Vocк nгo estб autorizado.");
    if(sscanf(cmdtext, "ud", id, level)) return SendClientMessage(playerid, 0xAD0000AA, "Use /daradmin [ID] [LEVEL]");
    if (level < 0 || level > 5) return SendClientMessage(playerid, 0xFF0000FF, "Level invбlido. Use de 1 б 5 .");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAD0000AA, "Este jogador nгo estб online.");
    GetPlayerName(id, ganhou, sizeof(ganhou));
    GetPlayerName(playerid, deu, sizeof(deu));
    format(string, sizeof(string), "Vocк deu admin level %s para o %s", GetLevelAdmin(level), ganhou);
    SendClientMessage(playerid, 0x00F6F6AA, string);
    format(string2, sizeof(string), "O admin %s deu admin level %s para vocк.", deu , GetLevelAdmin(level));
    SendClientMessage(id, Verde, string);
    pAdmin[id][Level] =  level;
    return 1;
}
Bom estou a +- umas 4 horas tentando desenvolver um comaando para setaradmin por id e nгo consigo o que tem de errado ?
Reply
#2

tenta

pawn Код:
if(strcmp("/setadmin", cmdtext, true) == 0)
{
    new id, level, string[256], string2[256], ganhou[MAX_PLAYER_NAME], deu[MAX_PLAYER_NAME];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD0000AA, "{00E5FF}Vocк nгo estб autorizado.");
    if(sscanf(cmdtext, "s[10]ud", cmd, id, level)) return SendClientMessage(playerid, 0xAD0000AA, "Use /daradmin [ID] [LEVEL]");
    if (level < 0 || level > 5) return SendClientMessage(playerid, 0xFF0000FF, "Level invбlido. Use de 1 б 5 .");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAD0000AA, "Este jogador nгo estб online.");
    GetPlayerName(id, ganhou, sizeof(ganhou));
    GetPlayerName(playerid, deu, sizeof(deu));
    format(string, sizeof(string), "Vocк deu admin level %s para o %s", GetLevelAdmin(level), ganhou);
    SendClientMessage(playerid, 0x00F6F6AA, string);
    format(string2, sizeof(string), "O admin %s deu admin level %s para vocк.", deu , GetLevelAdmin(level));
    SendClientMessage(id, Verde, string);
    pAdmin[id][Level] =  level;
    return 1;
}
Reply
#3

Ai lek transformei meu Gamemode em zcmd agora vou ver um tuto de zcmd pra fz sistema de admin vlw pela forзa mas pode deixar que vo focar pra estudar nas horas vagas faloooow : )))))
Reply
#4

talvez ajude isto

https://sampforum.blast.hk/showthread.php?tid=319000
https://sampforum.blast.hk/showthread.php?tid=277842
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)