chat help
#1

hey I have this code here
PHP код:
if (PlayerIgnored[i][playerid] == 0SendPlayerMessageToPlayer(iplayeridtext); 
this send the player message when he type like this Silver:balabla but I need it to send it like this Silver[id]:ballala and idk how to do it can anyone help me?
Reply
#2

PHP код:
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string),"%s[%i]: %s"nameplayeridtext);
if (
PlayerIgnored[i][playerid] == 0SendPlayerMessageToPlayer(iplayeridstring); 
Reply
#3

now it sends it like Silver:Silver[id]:bala;
Reply
#4

That's because You have a custom function to send the message. Can you show the SendPlayerMessageToPlayer Function?
Reply
#5

I don't have custom
function
Reply
#6

i made this but it doesn't getplayercolor correctly
PHP код:
                new ptext[256], pname[MAX_PLAYER_NAME];
                
GetPlayerName(playeridpnamesizeof(pname));
                
format(ptextsizeof(ptext), "{%d}%s[%d]:{FFFFFF} %s",GetPlayerColor(playerid), pnameplayeridtext);
                if (
PlayerIgnored[i][playerid] == 0SendClientMessage(,COLOR_WHITE,ptext); 
Reply
#7

For the first part:
PHP код:
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string),"%s[%i]: %s"nameplayeridtext);
if (
PlayerIgnored[i][playerid] == 0SendClientMessage(iCOLOR_WHITEstring); 
For the get player colour:

PHP код:
new ptext[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playeridpnamesizeof(pname));
format(ptextsizeof(ptext), "{%06x}%s[%d]:{FFFFFF} %s"GetPlayerColor(playerid) >>> 8pnameplayeridtext);
if (
PlayerIgnored[i][playerid] == 0SendClientMessage(,COLOR_WHITE,ptext); 
Reply
#8

thanks +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)