Raised This Month: $ Target: $400
 0% 

Command, start loop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 01-04-2006 , 04:58   Command, start loop
Reply With Quote #1

I'm reposting this, i thought i fixed it but i didn't.
here is what it should do:


Admin uses a command like amx_test to choose a player. ex amx_test obbin (the admin can't choose himself)

then a loop starts that makes everybody say teir #id (the id that appear when you type status in console) like "say my id is: #1".

The one that executed the command (the admin) and the one that was choosen by the command (The choosen) should not say anything.



Hope you understood this mess
__________________
Sig(h)!
Obbin is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 01-04-2006 , 06:48  
Reply With Quote #2

Try:
Code:
public command_handler(id) {    // I don't do any access checking because I don't know whether you want it    new arg[32]    read_argv(1,arg,31)    new player = cmd_target(id,arg,1)  // 1 = obey immunity, no idea whether you want that though    if (!player)       return PLUGIN_HANDLED    for (new i = 1; i <= 32; ++i)    {       if (is_user_connected(i) && i != id && i != player)          client_cmd(i, "say my id is %d", get_user_userid(i));    } }

Or something like that
__________________
hello, i am pm
PM is offline
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 01-04-2006 , 07:10  
Reply With Quote #3

Thx PM that worked
__________________
Sig(h)!
Obbin is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 16:12.


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