AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   who can tell me ? (https://forums.alliedmods.net/showthread.php?t=98281)

K.K.Lv 07-24-2009 05:01

who can tell me ?
 
for example
PHP Code:

public plugin_init()
{
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR)
 
register_logevent("NewRound"2"0=World triggered""1=Round_Start")
}
public 
NewRound()
{
new 
players[32], pnum
get_players
(playerspnum)
for (new 
0pnumi++)
{
new 
id players[i]
client_print(idprint_chat"This is a example")
}


Is this code will send chat message to everyone who put in server when round start ?

ConnorMcLeod 07-24-2009 05:20

Re: who can tell me ?
 
Yes, but you could pass id=0 so it prints to all players :

PHP Code:

public plugin_init()
{
     
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR)
     
register_logevent("NewRound"2"0=World triggered""1=Round_Start")
}

public 
NewRound()
{
     
client_print(0print_chat"This is a example")



K.K.Lv 07-24-2009 07:06

Re: who can tell me ?
 
thx..I will remember it!


All times are GMT -4. The time now is 18:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.