21.02.2009, 08:01
Hi, I've problem with Gang Chat, when I'm in gang and I want to use gang chat so I type "!" before my message, but when I do this nothing happens, my message is displayed in chat and anyone can see what I wrote...
Here is the code :
If I delete this :
new te[256];
format(te, sizeof(te),"(id:%d): %s", playerid, text);
SendPlayerMessageToAll(playerid, te);
return 0;
then everything works fine, but I'm using this to show ID after nick.
Can someone help me with this ?
Thanks.
Here is the code :
Quote:
public OnPlayerText(playerid, text[]) { new te[256]; format(te, sizeof(te),"(id:%d): %s", playerid, text); SendPlayerMessageToAll(playerid, te); return 0; if(text[0] == '!') { if(playerGang[playerid] > 0) { new gangChat[256]; new senderName[MAX_PLAYER_NAME]; new string[256]; // for(new i = 1; i < strlen(text)+1; i++) // gangChat[i]=text[i]; strmid(gangChat,text,1,strlen(text)); GetPlayerName(playerid, senderName, sizeof(senderName)); format(string, sizeof(string),"Gang Chat: %s: %s", senderName, gangChat); for(new i = 0; i < gangInfo[playerGang[playerid]][1]; i++) { SendClientMessage(gangMembers[playerGang[playerid]][i], ROZOWY, string); } } return 0; } return 1; } |
new te[256];
format(te, sizeof(te),"(id:%d): %s", playerid, text);
SendPlayerMessageToAll(playerid, te);
return 0;
then everything works fine, but I'm using this to show ID after nick.
Can someone help me with this ?
Thanks.