SendClientMessage
#1

Hi, can someone write me stock to this SCM?:

PHP код:
SendClientMessage(playerid, -1""RED"["TAG"]: "WHITE"Hi"RED"%s "WHITE" on this server"GetPlayerNick(playerid)); 
Because I don't know how I can add this.
Reply
#2

Try this bro
Quote:

new string[256];
format(string,sizeof(string),""RED"["TAG"]: "WHITE"Hi"RED"%s "WHITE" on this server", GetPlayerNick(playerid));
SendClientMessage(playerid, -1, string);

Reply
#3

Strange:
Код HTML:
gamemode.pwn(30) : error 001: expected token: "-string end-", but found "-identifier-"
gamemode.pwn(30) : warning 215: expression has no effect
gamemode.pwn(30) : error 001: expected token: ";", but found "-integer value-"
gamemode.pwn(30) : error 001: expected token: "-string end-", but found "-identifier-"
gamemode.pwn(30) : fatal error 107: too many error messages on one line
30:
PHP код:
format(string,sizeof(string),RED"["TAG"]: "WHITE"Hi"RED"%s "WHITE" on this server"GetPlayerNick(playerid)); 
Reply
#4

PHP код:
format(string,sizeof(string),"RED["TAG"]: "WHITE"Hi"RED"%s "WHITE" on this server"GetPlayerNick(playerid)); 
Reply
#5

Edited: Deadpoop is faster than me
Reply
#6

do not delete the ""

Код:
format(string,sizeof(string),""RED"["TAG"]: "WHITE"Hi"RED"%s "WHITE" on this server", GetPlayerNick(playerid));
Reply
#7

same
Код HTML:
gamemode.pwn(30) : error 001: expected token: "-string end-", but found "-identifier-"
gamemode.pwn(30) : error 001: expected token: "-string end-", but found "-identifier-"
gamemode.pwn(30) : warning 215: expression has no effect
gamemode.pwn(30) : error 001: expected token: ";", but found "-integer value-"
gamemode.pwn(30) : fatal error 107: too many error messages on one line
Colors
Код HTML:
#define WHITE				0xFFFFFFAA
#define RED 				0xFF0000AA
...
30:
PHP код:
format(string,sizeof(string),""RED"["TAG"]: "WHITE"Hi"RED"%s "WHITE" on this server"GetPlayerNick(playerid)); 
Reply
#8

Quote:
Originally Posted by Oficer
Посмотреть сообщение
same
Код HTML:
gamemode.pwn(30) : error 001: expected token: "-string end-", but found "-identifier-"
gamemode.pwn(30) : error 001: expected token: "-string end-", but found "-identifier-"
gamemode.pwn(30) : warning 215: expression has no effect
gamemode.pwn(30) : error 001: expected token: ";", but found "-integer value-"
gamemode.pwn(30) : fatal error 107: too many error messages on one line
Colors
Код HTML:
#define WHITE				0xFFFFFFAA
#define RED 				0xFF0000AA
...
30:
PHP код:
format(string,sizeof(string),""RED"["TAG"]: "WHITE"Hi"RED"%s "WHITE" on this server"GetPlayerNick(playerid)); 
lol

Код HTML:
#define WHITE      "{FFFFFF}"
#define RED          "{FF0000}"
try it like this

as you have defined "TAG"?
Reply
#9

^
Okey is good, I have wrong defined colors. Thanks bro!
And this:
error 017: undefined symbol "GetPlayerNick"
Reply
#10

Quote:
Originally Posted by Oficer
Посмотреть сообщение
^
Okey is good, I have wrong defined colors. Thanks bro!
And this:
error 017: undefined symbol "GetPlayerNick"
Код:
stock GetPlayerNick(playerid)
{
    static name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	return name;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)