if(strcmp(cmd,"/relato",true) ==0 || strcmp(cmd,"/re",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, COLOR_RED, "[BGH] Vocк foi mutado por um admin, nгo pode falar.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
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, "USO: /relato [texto]");
return 1;
}
if(ReduceTime[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк precisa esperar 3 segundos para usar esse comando denovo !");
return 1;
}
SendClientMessage(playerid, COLOR_YELLOW, "[BGH] Relatуrio enviado para os administradores.");
format(string, sizeof(string), "[Relato] %s(%d) relatou: %s", sendername,playerid, (result));
ABroadCast(COLOR_KICKBAN,string,1);
format(string, sizeof(string), "[Relato] %s(%d) relatou: %s", sendername,playerid, (result));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
ReduceTime[playerid] = 1;
SetTimerEx("ReduceTimer", 3000, false, "i", playerid);
}
return 1;
}
ShowPlayerDialog(playerid,DIALOG_RELATORIO,DIALOG_STYLE_INPUT,"Relatorio","Digite a sua Mensagem para os Administradores Onlines","Enviar","Cancelar");
if(dialogid == DIALOG_RELATORIO)
{
new nome[MAX_PLAYER_NAME];
GetPlayerName(playerid,nome,24);
format(string, sizeof(string), "[Relato] %s(%d) relatou: %s", nome,playerid, inputtext);
ABroadCast(COLOR_KICKBAN,string,1);
format(string, sizeof(string), "[Relato] %s(%d) relatou: %s", nome,playerid,inputtext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
#include a_samp
public OnPlayerCommandtext(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/relatar", true))
{
ShowPlayerDialog(playerid, 999, DIALOG_STYLE_INPUT,"~ Relato ~", "Por favor, digite oque vocк deseja relatar:","Relatar","Cancelar");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 999)
{
if(response)
{
if(!strlen(inputtext))
return ShowPlayerDialog(playerid, 999, DIALOG_STYLE_INPUT,"~ Relato ~", "Por favor, digite oque vocк deseja relatar:\nDigite alguma coisa!","Relatar","Cancelar");
if(strlen(inputtext) < 3)
return ShowPlayerDialog(playerid, 999, DIALOG_STYLE_INPUT,"~ Relato ~", "Por favor, digite oque vocк deseja relatar:\nO relato tem de ser maior que 3 caracters!!","Relatar","Cancelar");
new str[200], Nome[24]; GetPlayerName(playerid, Nome, 24);
format(str, sizeof(str), "[Relato] %s(%d) relatou: %s", Nome,playerid, inputtext);
ABroadCast(COLOR_KICKBAN,str,1);
format(str, sizeof(str), "Vocк relatou %s", inputtext);
SendClientMessage(playerid, -1, str);
}
}
return 1;
}
#define relatoMB 156
if(strcmp(cmd, "/relato", true) == 0)
{
ShowPlayerDialog(playerid, relatoMB, DIALOG_STYLE_INPUT, "Sistema de Relatorio by MatriXBorn", "Vocк abriu o Sistema de Relatorio em Dialog do MatriXBorn", "Enviar", "Cancelar");
return 1;
}
new string[128];
new result[128];
new sendername[MAX_PLAYER_NAME];
if(dialogid == relatoMB)
{
SendClientMessage(playerid, COLOR_YELLOW, "Sistema de relatorio Feiot por MatriXBorn Relato funfando);
format(string, sizeof(string), "sistema relato MatriXBorn [Relato] %s(%d) relatou: %s", sendername,playeri(result));
ABroadCast(-1,string,1);
format(string, sizeof(string), "Sistema de relato MatriXBorn [Relato] %s(%d) relatou: %s", sendername,playerid,(result));
SendClientMessage(playerid,-1, string);
}
return 1;
}
Topo GM
PHP код:
PHP код:
PHP код:
|
#define relatoMB 111
C:\Documents and Settings\LUIZ GUSTAVO\Meus documentos\2\gamemodes\BGH.pwn(28217) : error 021: symbol already defined: "string"
C:\Documents and Settings\LUIZ GUSTAVO\Meus documentos\2\gamemodes\BGH.pwn(28219) : error 021: symbol already defined: "sendername"
C:\Documents and Settings\LUIZ GUSTAVO\Meus documentos\2\gamemodes\BGH.pwn(28221) : warning 217: loose indentation
C:\Documents and Settings\LUIZ GUSTAVO\Meus documentos\2\gamemodes\BGH.pwn(28223) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\LUIZ GUSTAVO\Meus documentos\2\gamemodes\BGH.pwn(28223) : error 017: undefined symbol "Sistema"
C:\Documents and Settings\LUIZ GUSTAVO\Meus documentos\2\gamemodes\BGH.pwn(28223) : error 017: undefined symbol "de"
C:\Documents and Settings\LUIZ GUSTAVO\Meus documentos\2\gamemodes\BGH.pwn(28223) : fatal error 107: too many error messages on one line
sente so os erros
PHP код:
|
new result[128];
if(dialogid == relatoMB)
{
SendClientMessage(playerid, COLOR_YELLOW, "Sistema de relatorio Feiot por MatriXBorn Relato funfando");
format(string, sizeof(string), "sistema relato MatriXBorn [Relato] %s(%d) relatou: %s", sendername,playerid(result));
ABroadCast(-1,string,1);
format(string, sizeof(string), "Sistema de relato MatriXBorn [Relato] %s(%d) relatou: %s", sendername,playerid,(result));
SendClientMessage(playerid,-1, string);
}
return 1;
}