SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 23/01/2011, 12:44 PM   #1
lewismichaelbbc
Huge Clucker
 
Join Date: Jun 2010
Posts: 222
Reputation: 5
Default SendClientMessage To All Players In A Virtual World

SendClientMessage To All Players In A Virtual World

This is what i would like:

Code:
if(strcmp(cmd, "/stuntchat", true) == 0 || strcmp(cmd, "/sc", true) == 0)
	 {

Code:
 if ( GetPlayerVirtualWorld( playerid ) == 5 )
	    {
But, i am not too sure what the code in the command would be...

Code:
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/sc)/stuntchat [text]");
format(string, sizeof(string), "[StuntChat] %s: %s]",PlayerName(playerid),tmp);
SendClientMessage(playerid,COLOR_YELLOW,string);

The above code does not work. would anyone be able to help me make the code??

I would like the command /stuntchat to send a message to all the people in virtual world 5.

Thank you for the help.
lewismichaelbbc is offline  
Old 23/01/2011, 12:45 PM   #2
Not available
Big Clucker
 
Join Date: Jan 2011
Posts: 94
Reputation: 0
Default Re: SendClientMessage To All Players In A Virtual World

Code:
format(string, sizeof(string), "[StuntChat] %s: %s]",PlayerName(playerid),tmp);
for(new i = 0; i < MAX_PLAYERS; i++)
{
	if(IsPlayerConnected(i) && GetPlayerVirtualWorld(playerid) == 5) SendClientMessage(playerid,COLOR_YELLOW,string);
}
__________________


http://peak-host.net Your #1 Multi-player Game hosting provider.
Not available is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Worlds - See Players In A Specific World lewismichaelbbc Help Archive 1 23/01/2011 11:37 AM
SendClientMessage to only nearby players Ihsan_Cingisiz Help Archive 17 02/06/2010 08:28 PM
virtual world??????????? kasis223 Help Archive 4 17/03/2010 10:17 PM
about putting players in virtual world Sfinx_17 Help Archive 9 12/11/2009 12:21 AM


All times are GMT. The time now is 10:13 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.