Talking in RP way
#1

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

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"
Reply
#3

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

Use proxdetector for this
Reply
#5

http://lmgtfy.com/?q=sa-mp+local+chat
Reply
#6

Tried that tutorial https://sampforum.blast.hk/showthread.php?tid=211599

Still the same.
Reply
#7

If you the text to be white, change the string to this "format(string,sizeof(string),"{FFFFFFFF}%s(%d ) said: %s",pname,playerid,params);"
Reply
#8

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

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);"
Reply
#10

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 Код:
[pawn]
[/pawn] code
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)