19.08.2014, 23:12
pawn Код:
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(611) : warning 217: loose indentation
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1144) : warning 217: loose indentation
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1178) : error 028: invalid subscript (not an array or too many subscripts): "pAdmin"
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1178) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1178) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1178) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Vini\Desktop\Vinicius\Left 4 Dead 2\gamemodes\L4D2.pwn(1178) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
pawn Код:
CMD:setadmin(playerid, params[])
{
new name[MAX_PLAYER_NAME];
new arquivo[40];
new string[158];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(arquivo, sizeof(arquivo), PASTA_CONTAS, name);
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid,VERMELHO,"Vocк nгo tem permissгo para usar este comando!");
static id,level;
if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,VERMELHO,"[ > ] Uso correto: /setadmin [id] [level] (Level 3 ao 5)");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,VERMELHO,"[x] O player nгo estб conectado!");
if(level > 3) return SendClientMessage(playerid,VERMELHO,"[x] O level mбximo de admin й 3!");
if (IsPlayerConnected(id))
{
if (level == 3)
{
SendClientMessage(id,-1,"|{00FF00}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {00FF00}••••••••••••••••••{FFFFFF}|");
format(string, sizeof(string), "•{00FF00}» {FFFFFF}O Administrador {00FF00}%s {FFFFFF}te promoveu para '{00FF00}Administrador{FFFFFF}'", name);
SendClientMessage(id,-1, string);
SendClientMessage(id,-1,"•{00FF00}» {FF0000}ATENЗГO: {FFFFFF}ajuda os players, de informaзхes e nгo faзa algo de errado.");
SendClientMessage(id,-1,"•{00FF00}» {FF0000}CMD: {FFFFFF}para ver os comandos disponiveis digite '/comandosadm'.");
SendClientMessage(id,-1,"|{00FF00}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {00FF00}••••••••••••••••••{FFFFFF}|");
DOF2_SetInt(arquivo, "Admin", 3);
}
else if (level == 2)
{
SendClientMessage(id,-1,"|{00FF00}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {00FF00}••••••••••••••••••{FFFFFF}|");
format(string, sizeof(string), "•{00FF00}» {FFFFFF}O Administrador {00FF00}%s {FFFFFF}te promoveu para '{00FF00}Mod{FFFFFF}'", name);
SendClientMessage(id,ROXO, string);
SendClientMessage(id,-1,"•{00FF00}» {FF0000}ATENЗГO: {FFFFFF}ajuda os players, de informaзхes e nгo faзa algo de errado.");
SendClientMessage(id,-1,"•{00FF00}» {FF0000}CMD: {FFFFFF}para ver os comandos disponiveis digite '/comandosadm'.");
SendClientMessage(id,-1,"|{00FF00}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {00FF00}••••••••••••••••••{FFFFFF}|");
DOF2_SetInt(arquivo, "Admin", 2);
}
else if (level == 1)
{
SendClientMessage(id,-1,"|{00FF00}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {00FF00}••••••••••••••••••{FFFFFF}|");
format(string, sizeof(string), "•{00FF00}» {FFFFFF}O Administrador {00FF00}%s {FFFFFF}te promoveu para '{00FF00}Ajudanter{FFFFFF}'", name);
SendClientMessage(id,ROXO, string);
SendClientMessage(id,-1,"•{00FF00}» {FF0000}ATENЗГO: {FFFFFF}ajuda os players, de informaзхes e nгo faзa algo de errado.");
SendClientMessage(id,-1,"•{00FF00}» {FF0000}CMD: {FFFFFF}para ver os comandos disponiveis digite '/comandosadm'.");
SendClientMessage(id,-1,"|{00FF00}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {00FF00}••••••••••••••••••{FFFFFF}|");
DOF2_SetInt(arquivo, "Admin", 1);
}
else if (level == 0)
{
if(pAdmin[id] == 2)
{
SendClientMessage(id,-1,"|{FF0000}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {FF0000}••••••••••••••••••{FFFFFF}|");
format(string, sizeof(string), "•» O Administrador %s retirou seu 'Moderador'", name);
SendClientMessage(id,ROXO, string);
SendClientMessage(id,-1,"•» BURRO: vocк deve nгo ter ajudado os players, ou feito algo de errado.");
SendClientMessage(id,-1,"|{FF0000}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {FF0000}••••••••••••••••••{FFFFFF}|");
DOF2_SetInt(arquivo, "Admin", 0);
}
else if(pAdmin[id] == 3)
{
SendClientMessage(id,-1,"|{FF0000}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {FF0000}••••••••••••••••••{FFFFFF}|");
format(string, sizeof(string), "•» O Administrador %s retirou seu 'Administrador'", name);
SendClientMessage(id,ROXO, string);
SendClientMessage(id,-1,"•» BURRO: vocк deve nгo ter ajudado os players, ou feito algo de errado.");
SendClientMessage(id,-1,"|{FF0000}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {FF0000}••••••••••••••••••{FFFFFF}|");
DOF2_SetInt(arquivo, "Admin", 0);
}
else if(pAdmin[id] == 1)
{
SendClientMessage(id,-1,"|{FF0000}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {FF0000}••••••••••••••••••{FFFFFF}|");
format(string, sizeof(string), "•» O Administrador %s retirou seu 'Ajudante'", name);
SendClientMessage(id,ROXO, string);
SendClientMessage(id,-1,"•» BURRO: vocк deve nгo ter ajudado os players, ou feito algo de errado.");
SendClientMessage(id,-1,"|{FF0000}•••••••••••••••••• {FFFFFF}Administraзгo Virtual Extreme {FF0000}••••••••••••••••••{FFFFFF}|");
DOF2_SetInt(arquivo, "Admin", 0);
pAdmin[id] = 0;
}
}
return 1;
}
else
{
SendClientMessage(playerid, Vermelho, "[x] Jogador nгo conectado.");
return 1;
}
}
}