CLASS CHAT - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: CLASS CHAT (
/showthread.php?tid=66236)
CLASS CHAT -
Zebadee - 20.02.2009
hi bit of a newb question but still ...
on my dm script i have 12 classes/factions
how can i set it so that when someone types some in chat it shows what class the have selected i.e
[outcasts]Zebadee says: wewt
now i had a go at it myself but the outcome ingame was showing the text twice like this:
[outcasts]Zebadee says: wewt
Zebadee: wewt
So that bit of code got deleted and i was hoping someone had a better way of doing this?
p.s I would like this to be in normal chat not with a further cmd like /f or whatever...
edit: I HAVE SEARCHED and i cant find how to change the default chat format someone has got to know what the solution is :P
Re: CLASS CHAT -
Zebadee - 20.02.2009
Cmon people help me out!
Re: CLASS CHAT -
Vyorel - 20.02.2009
1. Dublu Posting
2. Wait!
Re: CLASS CHAT -
Zebadee - 20.02.2009
waitin... time of first post 09:33:25 am
this is a support forum right?
Re: CLASS CHAT -
Daren_Jacobson - 20.02.2009
i believe you switch the return around (if it is 1, put it 0,if 0 put it 1)
not 100% sure though
Re: CLASS CHAT -
Zebadee - 20.02.2009
nothing.. can someone give me an example plz?
Re: CLASS CHAT -
Ghett0 - 20.02.2009
pawn Код:
if(strfind(text[1], "#", true) != -1)
{
new Msg[256];
new PName[MAX_PLAYER_NAME];
strdel(cmdtext, 0, 7);
GetPlayerName(playerid, PName, sizeof(PName));
format(Msg, sizeof(Msg), "[TEAM CHAT] %s: %s", PName, cmdtext);
for(new i; i < GetMaxPlayers(); i++) if(FactionNum[playerid] == FactionNum[i]) SendClientMessage(i, 0x00FF00FF, Msg);
}
Put that in OnPlayerText, and change FactionNum to whatever variable the script uses for each player's faction, then you can do #text.