Talking in RP way -
Tachibana - 21.06.2011
Hey guys.
I am confused on how to do that in roleplay way when people write it does not show random colors, (would be nice to turn them off as well just to make them white?) so only ppl near the person will see what someone writes?
as well as out of character? I know how to do normal commands with zcmd (CMD
for admin aka kick etc but Im confused about ooc as well?
Anyone could help me?
Re: Talking in RP way -
Kastranova - 21.06.2011
you mean something like this?
pawn Код:
public OnPlayerText(playerid, text[])
{
#define COLOR_MESSAGE 0xFFFF00AA
new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
new id;
new string[128];
new params[128];
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(id,10/*range around the player*/,x,y,z)) {
format(string,sizeof(string),"%s(%d) said: %s",pname,playerid,params);
SendClientMessage(id,COLOR_MESSAGE,string);
}
return 1;
}
This code can be used in a roleplay... "Name says: text he says"
Re: Talking in RP way -
Tachibana - 21.06.2011
Quote:
Originally Posted by Kastranova
you mean something like this?
pawn Код:
public OnPlayerText(playerid, text[]) { #define COLOR_MESSAGE 0xFFFF00AA new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,MAX_PLAYER_NAME); new id; new string[128]; new params[128]; new Float:x,Float:y,Float:z; GetPlayerPos(playerid, x, y, z); if(IsPlayerInRangeOfPoint(id,10/*range around the player*/,x,y,z)) { format(string,sizeof(string),"%s(%d) said: %s",pname,playerid,params); SendClientMessage(id,COLOR_MESSAGE,string); } return 1; }
This code can be used in a roleplay... "Name says: text he says"
|
Nope that does not work. Tried it, still the DM way talking is on and other thing is added is like PM like stuff when I write test it says says in Yellow (PLAYERNAME) TEXT (ID) and below it normal chat
Re: Talking in RP way -
Mokerr - 21.06.2011
Use proxdetector for this
Re: Talking in RP way -
Swiftz - 21.06.2011
http://lmgtfy.com/?q=sa-mp+local+chat
Re: Talking in RP way -
Tachibana - 21.06.2011
Tried that tutorial
https://sampforum.blast.hk/showthread.php?tid=211599
Still the same.
Re: Talking in RP way -
Wesley221 - 21.06.2011
If you the text to be white, change the string to this "format(string,sizeof(string),"{FFFFFFFF}%s(%d ) said: %s",pname,playerid,params);"
Re: Talking in RP way -
Tachibana - 21.06.2011
Quote:
Originally Posted by Wesley221
If you the text to be white, change the string to this "format(string,sizeof(string),"{FFFFFFFF}%s(%d ) said: %s",pname,playerid,params);"
|
Would be wonderful if u would explain it in details...
Re: Talking in RP way -
Wesley221 - 21.06.2011
You wanted the color to be white if he talks right? Then we need the color white (0xFFFFFFFF).
Aslong you dont got anything in OnPlayerText, your color when you talk will be the standart colors. Thats why you need to change to colors by yourself.
"format(string,sizeof(string),"%s(%d ) said: %s",pname,playerid,params);", this shows just the standart player color.
If we add "{FFFFFFFF}" before everything, the color will be changed in white.
"format(string,sizeof(string),"{FFFFFFFF}%s(%d ) said: %s",pname,playerid,params);"
Re: Talking in RP way -
Tachibana - 21.06.2011
Quote:
Originally Posted by Wesley221
You wanted the color to be white if he talks right? Then we need the color white (0xFFFFFFFF).
Aslong you dont got anything in OnPlayerText, your color when you talk will be the standart colors. Thats why you need to change to colors by yourself.
"format(string,sizeof(string),"%s(%d ) said: %s",pname,playerid,params);", this shows just the standart player color.
If we add "{FFFFFFFF}" before everything, the color will be changed in white.
"format(string,sizeof(string),"{FFFFFFFF}%s(%d ) said: %s",pname,playerid,params);"
|
All I want is to have like roleplay server has whne they speak not in DM way (because im doing rp script)
And as well please use
[/pawn] code