AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Multiple commands in a case? (https://forums.alliedmods.net/showthread.php?t=222424)

JoooN 08-02-2013 12:11

Multiple commands in a case?
 
Hi, so i'm creating a menu, and I need to put 2 commands in case 1, so how to separate them?
Thanks for help :D
edit: like client_cmd <myfirstcommand> <value> <mysecondcommand> <value>

Black Rose 08-02-2013 12:49

Re: Multiple commands in a case?
 
Simple example:
Code:
new arg1[32], arg2[192], arg3[8], arg4[128]; read_argv(1, arg1, 31); read_argv(2, arg2, 191); read_argv(3, arg3, 7); read_argv(4, arg4, 127);
If you need further help you could explain a bit more.

akcaliberg 08-02-2013 13:13

Re: Multiple commands in a case?
 
PHP Code:

case 1:{
    
client_cmd(id,"your first command;your second command")


or

PHP Code:

case 1:{
    
client_cmd(id,"your first command")
    
client_cmd(id,"your second command")


is that what you are asking about ?

^SmileY 08-03-2013 10:07

Re: Multiple commands in a case?
 
Quote:

Originally Posted by akcaliberg (Post 2004270)
PHP Code:

case 1:{
    
client_cmd(id,"your first command;your second command")


or

PHP Code:

case 1:{
    
client_cmd(id,"your first command")
    
client_cmd(id,"your second command")


is that what you are asking about ?

Wrong, its 2 native calls.

akcaliberg 08-03-2013 11:35

Re: Multiple commands in a case?
 
first one only calls 1 native. I'm just trying to guess what he is asking about


All times are GMT -4. The time now is 15:43.

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