Chat Help
#1

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;
}
Reply
#2

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] ?
Reply
#3

Fs :

Код:
Removed
Reply
#4

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


Forum Jump:


Users browsing this thread: 2 Guest(s)