AYUDA REPORTS EN DIALOG!
#2

Код:
#define DIALOG_REPORT (1)

dcmd_report(playerid,params[])
{
    ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_INPUT, "REPORT", "Escribe Tu Reporte Aqui:", "Reposrtar", "Cancel");
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_REPORT)
    {
		if(response)
		{
		    new reported, tmp[256], tp3[256], Index;		tmp = strtok(inputtext,Index), tp3 = strtok(inputtext,Index);
		    if(!strlen(inputtext)) return SendClientMessage(playerid, red, "USA: /report [playerid] [razon]");
			reported = strval(inputtext);

		 	if(IsPlayerConnected(reported) && reported != INVALID_PLAYER_ID) {

			if(IsPlayerFlooding(playerid)) return SendClientMessage(playerid,red,"[ADVERTENCIA]: No Agas Flood De Reportes! Espera 3 Segundos e Intentalo De Nuevo!");
			iPlayerChatTime[playerid] = GetTickCount();

				if(PlayerInfo[reported][Level] == ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"[ERROR]: Tu No Puedes Reportar a Ese Adminstrador");
				if(playerid == reported) return SendClientMessage(playerid,red,"[ERROR]: No Te Puedes Reportar a Ti Mismo");
				if(strlen(inputtext) > 7) {
					new reportedname[MAX_PLAYER_NAME], reporter[MAX_PLAYER_NAME], str2[128], hour,minute,second; gettime(hour,minute,second);
					GetPlayerName(reported, reportedname, sizeof(reportedname));	GetPlayerName(playerid, reporter, sizeof(reporter));
					format(str2, sizeof(str2), "||Reporte||  %s(%d) Reporto %s(%d) Razon: %s |@%d:%d:%d|", reporter,playerid, reportedname, reported, params[strlen(tmp)+1], hour,minute,second);
					MessageToAdmins(COLOR_RED,str2);
					SaveToFile("ReportLog",str2);
					format(str2, sizeof(str2), "Reporte(%d:%d:%d): %s(%d) Reporto %s(%d) Razon: %s", hour,minute,second, reporter,playerid, reportedname, reported, params[strlen(tmp)+1]);
					for(new i = 1; i < MAX_REPORTS-1; i++) Reports[i] = Reports[i+1];
					Reports[MAX_REPORTS-1] = str2;
					return SendClientMessage(playerid,yellow, "Tu Reporte Fue Enviado a Los Administradores Conectados!");
				} else return SendClientMessage(playerid,red,"[ERROR]: Esa No Es Una Razon Valida");
			} else return SendClientMessage(playerid, red, "El Jugador No Esta Conectado!");
		}
	}
    return 0; 
}
Reply


Messages In This Thread
AYUDA REPORTS EN DIALOG! - by Insami - 10.12.2012, 23:52
Respuesta: AYUDA REPORTS EN DIALOG! - by OTACON - 11.12.2012, 02:43
Respuesta: AYUDA REPORTS EN DIALOG! - by Insami - 11.12.2012, 04:29
Respuesta: AYUDA REPORTS EN DIALOG! - by OTACON - 11.12.2012, 05:47
Respuesta: AYUDA REPORTS EN DIALOG! - by Insami - 11.12.2012, 16:20
Respuesta: AYUDA REPORTS EN DIALOG! - by Matyaas - 19.07.2013, 23:10
Respuesta: AYUDA REPORTS EN DIALOG! - by Parka - 20.07.2013, 04:31

Forum Jump:


Users browsing this thread: 1 Guest(s)