SA-MP Forums Archive
Problema whisper (/w) - 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: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Problema whisper (/w) (/showthread.php?tid=358087)



Problema whisper (/w) - alexan12 - 09.07.2012

Bueno resulta que cuando los bloquea igual llegan los mensajes,miren si algo esta mal
Este es para bloquearlo
Код:
zcmd(togpm, playerid, params[]){
        if(Info[playerid][pAdminZC] < 1) return SendClientMessageEx(playerid, COLOR_GRAD2, "No eres administrador!");
		if (!HidePM[playerid]){
			HidePM[playerid] = 1;
			SendClientMessageEx(playerid, COLOR_GRAD2, "ЎPMs Bloqueados!");
		}
		else if (HidePM[playerid]){
			HidePM[playerid] = 0;
			SendClientMessageEx(playerid, COLOR_GRAD2, "ЎPMs Habilitados!");
		}
        return 1;
    }
Este es el script del whisper
Код:
CMD:w(playerid, params[])
{
	new whis[128], string[128], id;
	if(sscanf(params, "us[128]", id, whis)) return SendClientMessageEx(playerid,  COLOR_GRAD2, "/w [id] [texto]");
	if(IsPlayerConnected(id))
	{
		if(Info[id][pAdminZC] < 1 && Info[playerid][pAdminZC] < 1) return SendClientMessage(playerid, COLOR_RED, "Solo puedes whispear  a los administradores");
		{if(HidePM[params[0]] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Este administrador/ayudante tiene los susurros bloqueados!");
			format(string, sizeof(string), "Mensaje de %s (%d): %s", GetPlayerNameEx(playerid), playerid, whis);
			SendClientMessageEx(id, 0xDBDE50FF, string);
			format(string, sizeof(string), "Mensajeastes a %s (%d): %s", GetPlayerNameEx(id), id, whis);
			SendClientMessageEx(playerid,  0xDBDE50FF, string);
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(Info[i][pAdminZC] >= 1338)
				{
					if(See_MP[i] == 1)
				    {
					    format(string, sizeof(string), "[R: %s(%d) a  User %s(%d): {FFFFFF}%s]", GetPlayerNameEx(playerid), playerid, GetPlayerNameEx(id), id, whis);
					    SendClientMessageEx(i, 0x00FF00FF, string);
					}
				}
			}
		}
	} else SendClientMessage(playerid, COLOR_RED, "El jugador no esta conectado");
 	return 1;
}



Re: Problema whisper (/w) - Daniel-92 - 09.07.2012

HidePM[params[0]] == 1) remplazб el params[0] por id