Sending a message to all while using /kill.
#3

Look up the GetPlayerName function. You'll also need to create a separate variable to store the string you'd like to pass to the SendClientMessageToAll function. We'll use the format function to format the string with our desired input.
pawn Код:
new name[ MAX_PLAYER_NAME ];
new string[ 50 ];
GetPlayerName( playerid, name, MAX_PLAYER_NAME );
format( string, sizeof( string ), "%s suicided!", name );
SendClientMessageToAll( 0xDEEE20FF, string );
I highly suggest you look up some more documentation on the basics of Pawn, such as creating variables, how to handle/access them, and how to use them. It'd also be nice to look through all the functions that SA:MP provides, via the Wiki.

EDIT: ^ Don't give reputation to beggers ^
Reply


Messages In This Thread
Sending a message to all while using /kill. - by Darnell - 09.08.2011, 08:36
Re: Sending a message to all while using /kill. - by Chrillzen - 09.08.2011, 08:38
Re: Sending a message to all while using /kill. - by Grim_ - 09.08.2011, 08:42
Re: Sending a message to all while using /kill. - by Darnell - 09.08.2011, 08:43
Re: Sending a message to all while using /kill. - by grand.Theft.Otto - 09.08.2011, 08:47
Re: Sending a message to all while using /kill. - by HyperZ - 09.08.2011, 08:50
Re: Sending a message to all while using /kill. - by Grim_ - 09.08.2011, 08:51
Re: Sending a message to all while using /kill. - by Darnell - 09.08.2011, 08:57

Forum Jump:


Users browsing this thread: 2 Guest(s)