SA-MP Forums Archive
Chat Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Chat Help (/showthread.php?tid=364079)



Chat Help - diablo16 - 29.07.2012

Hi please help me i have a create clan sistem with a chat but it's not working wen i write "! [Text]":

Код:
public OnPlayerText(playerid, text[])
{
	if(text[0] == '!') {
		if(playerGang[playerid] > 0) {
		    new gangChat[256];
		    new senderName[MAX_PLAYER_NAME];
		    new string[256];

			strmid(gangChat,text,1,strlen(text));

			GetPlayerName(playerid, senderName, sizeof(senderName));
			format(string, sizeof(string),"[GANG %s:] %s", senderName, gangChat);

			for(new i = 0; i < gangInfo[playerGang[playerid]][1]; i++) {
				SendClientMessage(gangMembers[playerGang[playerid]][i], COLOR_LIGHTBLUE, string);
			}
		}

		return 0;
	}
	return 1;
}



Re: Chat Help - Misiur - 29.07.2012

pawn Код:
for(new i = 0; i < gangInfo[playerGang[playerid]][1]; i++) {

//to

for(new i = 0; i < sizeof(gangInfo[playerGang[playerid]]); i++) {
@Edit:

Oh wait, not quite right. What are you holding in gangInfo[playerGang[playerid]][1] ?


Re: Chat Help - diablo16 - 29.07.2012

Fs :

Код:
Removed



Re: Chat Help - Misiur - 29.07.2012

I don't understand your language, but http://i.minus.com/i6PTUmRAakc7V.png works for me