CLASS CHAT
#1

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

Cmon people help me out!
Reply
#3

1. Dublu Posting
2. Wait!
Reply
#4

waitin... time of first post 09:33:25 am

this is a support forum right?
Reply
#5

i believe you switch the return around (if it is 1, put it 0,if 0 put it 1)
not 100% sure though
Reply
#6

nothing.. can someone give me an example plz?
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)