SA-MP Forums Archive
[Ajuda] Ajuda Comando Secreto - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda Comando Secreto (/showthread.php?tid=523921)



Ajuda Comando Secreto - LE4NDrO - 04.07.2014

To tentnado criar um comando secreto tipo /myadmin

O Server ja tem o sistema
pawn Код:
new pAdmin[MAX_PLAYERS][PlayerAdmin];
new PlayerInfo[MAX_PLAYERS][pInfo];
To tentando por no comando mais n pega
pawn Код:
PlayerInfo[Playerid][pAdmin] = 5;
Mais no game mode da erro :
pawn Код:
error 017: undefined symbol "Playerid"



Re: Ajuda Comando Secreto - darkxdll - 04.07.2014

PHP код:
PlayerInfo[playerid][pAdmin] = 5
й "playerid" sem aspas e nгo "Playerid"


Re: Ajuda Comando Secreto - UPsamp - 04.07.2014

PHP код:
new pAdmin[MAX_PLAYERS][PlayerAdmin];
new 
PlayerInfo[MAX_PLAYERS][pInfo]; 
Que estranho


Re: Ajuda Comando Secreto - LE4NDrO - 04.07.2014

Quote:
Originally Posted by UPsamp
Посмотреть сообщение
PHP код:
new pAdmin[MAX_PLAYERS][PlayerAdmin];
new 
PlayerInfo[MAX_PLAYERS][pInfo]; 
Que estranho
??, o sistema da completo sу botei as news para vocкs verem '-'


Re: Ajuda Comando Secreto - LE4NDrO - 04.07.2014

Resolvi
pawn Код:
PlayerInfo[playerid][PlayerAdmin] = 5;
Deu 1 Warring :
pawn Код:
warning 213: tag mismatch



Re: Ajuda Comando Secreto - LE4NDrO - 04.07.2014

O Comando nгo pego :/

Comando de setar normal
pawn Код:
CMD:setadmin(playerid, params[])
{
 new id, level, string[256], string2[256], ganhou[MAX_PLAYER_NAME], deu[MAX_PLAYER_NAME];
 if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Vocк й um Administrador Logado Na RCON.");
 if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, 0x004000FF, "Use /setadmin [id] [LEVEL]");
 if (level < 0 || level > 5) return SendClientMessage(playerid, 0xFF0000FF, "Level invбlido. Use de 1 б 5 .");
 if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "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, 0x004000FF, string);
 format(string2, sizeof(string2), "O admin %s deu admin level %s para vocк.", deu , GetLevelAdmin(level));
 SendClientMessage(id, 0x004000FF, string2);
 pAdmin[id][Level] =  level;
 return 1;
}
Quero criar um secreto tipo.. /myadmin, alguйm ajuda aкo ?


Re: Ajuda Comando Secreto - PT - 04.07.2014

pawn Код:
enum DATA
{
    pAdmin
}

new PlayerInfo[MAX_PLAYERS][DATA];

// uso:
PlayerInfo[playerid][pAdmin];



Re: Ajuda Comando Secreto - LE4NDrO - 04.07.2014

Quote:
Originally Posted by PT
Посмотреть сообщение
pawn Код:
enum DATA
{
    pAdmin
}

new PlayerInfo[MAX_PLAYERS][DATA];

// uso:
PlayerInfo[playerid][pAdmin];
O Meu e assim
pawn Код:
enum PlayerAdmin
{
    Level
}
pawn Код:
new pAdmin[MAX_PLAYERS][PlayerAdmin];
pawn Код:
new PlayerInfo[MAX_PLAYERS][pInfo];



Re: Ajuda Comando Secreto - FabioGTP - 04.07.2014

cria esse enum data igual o pt disse vai dar certo


Re: Ajuda Comando Secreto - MultiKill - 04.07.2014

Estude mais sobre enumeradores.
pawn Код:
pAdmin[MAX_PLAYERS][Level] = 5;