new PermTuto;
new PermTutopl;
forward PermTutopl(playerid); // linha 38
if(strcmp(cmd, "/relatorio", true) == 0)
{
if(PermTuto[playerid] == 0)/*Linha do erro || 2990 */
{
if(IsPlayerConnected(playerid))
{
PermTuto[playerid] = 1;
SetTimerEx("PermTutopl",10000,false,"i",playerid);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /relatorio [texto]");
return 1;
}
if(PlayerInfo[playerid][pVIP] == 1)
{
format(string, sizeof(string), "[RELATУRIO VIP Bronze] %s (%d): %s", sendername,playerid, (result));
SendAdminMessage(COLOR_GREEN,string);
}
else if(PlayerInfo[playerid][pVIP] == 2)
{
format(string, sizeof(string), "[RELATУRIO VIP Silver] %s (%d): %s", sendername,playerid, (result));
SendAdminMessage(COLOR_PINK,string);
}
else if(PlayerInfo[playerid][pVIP] == 3)
{
format(string, sizeof(string), "[RELATУRIO VIP Gold] %s (%d): %s", sendername,playerid, (result));
SendAdminMessage(COLOR_BLUE,string);
}
else
{
format(string, sizeof(string), "[RELATУRIO]: %s (%d): %s", sendername,playerid, (result));
SendTesterAdminMessage(COLOR_RED,string);
SendClientMessage(playerid, COLOR_GREEN, "Seu Relatуrio Foi Enviado Aos Admins e Testers Online.");
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /relatorio %s",d,m,y,h,mi,s,sendername, (result));
CommandLog(string);
ReportLog(string);
}
}
}
return 1;
}
public PermTutopl(playerid)
{
PermTuto[playerid] = 0;
}
Compilando Roleplay.pwn... D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(3 : error 021: symbol already defined: "PermTutopl" D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(16497) : warning 217: loose indentation // Mal identado :S D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(29990) : error 028: invalid subscript (not an array or too many subscripts): "PermTuto" D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(29990) : warning 215: expression has no effect D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(29990) : error 001: expected token: ";", but found "]" D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(29990) : error 029: invalid expression, assumed zero D:\SA-MP\Gunners\gamemodes\Roleplay.pwn(29990) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors. |
new Flood[MAX_PLAYERS];
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/relatorio",true))
{
if(Flood[playerid] > gettime())
return SendClientMessage(playerid,-1,"Sem flood");
Flood[playerid] = gettime()+5;
//Resto do comando
return 1;
}
return 0;
}
new timer[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/relatorio", true) == 0)
{
if(timer[playerid] > gettime()) return SendClientMessage(playerid, 0xFFFF00FF, "Aguarde 10 segundos para usar este comando de novo.");
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /relatorio [texto]");
if(PlayerInfo[playerid][pVIP] == 1)
{
format(string, sizeof(string), "[RELATУRIO VIP Bronze] %s (%d): %s", sendername,playerid, (result));
SendAdminMessage(COLOR_GREEN,string);
}
else if(PlayerInfo[playerid][pVIP] == 2)
{
format(string, sizeof(string), "[RELATУRIO VIP Silver] %s (%d): %s", sendername,playerid, (result));
SendAdminMessage(COLOR_PINK,string);
}
else if(PlayerInfo[playerid][pVIP] == 3)
{
format(string, sizeof(string), "[RELATУRIO VIP Gold] %s (%d): %s", sendername,playerid, (result));
SendAdminMessage(COLOR_BLUE,string);
}
else
{
format(string, sizeof(string), "[RELATУRIO]: %s (%d): %s", sendername,playerid, (result));
SendTesterAdminMessage(COLOR_RED,string);
}
SendClientMessage(playerid, COLOR_GREEN, "Seu Relatуrio Foi Enviado Aos Admins e Testers Online.");
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /relatorio %s",d,m,y,h,mi,s,sendername, (result));
CommandLog(string);
ReportLog(string);
timer[playerid] = gettime()+10;
return 1;
}
return 0;
}
new PermTuto;
if(PermTuto[playerid] == 0)