Raised This Month: $ Target: $400
 0% 

why is dont work?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
oei
Junior Member
Join Date: Nov 2011
Old 11-01-2011 , 09:27   why is dont work?
Reply With Quote #1

PHP Code:
new const Cmd[][] = { "say /shop""say shop""radio1" 
PHP Code:
//in plugin_init
register_clcmd(Cmd[1], "shop"
thx.

Last edited by oei; 11-01-2011 at 09:28.
oei is offline
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 11-01-2011 , 09:29   Re: why is dont work?
Reply With Quote #2

Quote:
Originally Posted by oei View Post
PHP Code:
new const Cmd[][] = { "say /shop""say shop""radio1" 
PHP Code:
//in plugin_init
register_clcmd(Cmd[1], "shop"
thx.
You forgot:
PHP Code:
for(new 0sizeof Cmdi++)
register_clcmd(Cmd[1], "shop"
__________________
Please enter this website everyday: http://forums.alliedmods.net/showthread.php?t=169067
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
Korxu
Senior Member
Join Date: Sep 2010
Old 11-01-2011 , 09:50   Re: why is dont work?
Reply With Quote #3

PHP Code:
new gsz_Cmds [ ] [ ] = { "say /shop""say_team /shop""say shop""say_team shop" }

// ...
public plugin_init ( )
{
     static 
i
     
for ( 0sizeof gsz_Cmds ); ++ )
     {
          
register_clcmd gsz_Cmds ], "shop" )
     }

Korxu is offline
oei
Junior Member
Join Date: Nov 2011
Old 11-01-2011 , 09:57   Re: why is dont work?
Reply With Quote #4

Quote:
Originally Posted by Korxu View Post
PHP Code:
new gsz_Cmds [ ] [ ] = { "say /shop""say_team /shop""say shop""say_team shop" }
 
// ...
public plugin_init ( )
{
     static 
i
     
for ( 0sizeof gsz_Cmds ); ++ )
     {
          
register_clcmd gsz_Cmds ], "shop" )
     }

i wont Not many lines
like this:

Quote:
Originally Posted by Evaldas.Grigas View Post
You forgot:
PHP Code:
for(new 0sizeof Cmdi++)
register_clcmd(Cmd[1], "shop"
Dont work..

Last edited by oei; 11-01-2011 at 09:58.
oei is offline
Korxu
Senior Member
Join Date: Sep 2010
Old 11-01-2011 , 10:20   Re: why is dont work?
Reply With Quote #5

Try my code... but it is the same.
PHP Code:
for ( new 0sizeof Cmd ); ++ )
     
register_clcmd Cmd ], "shop" 
Korxu is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 11-01-2011 , 10:38   Re: why is dont work?
Reply With Quote #6

PHP Code:
new const Cmd[][] = { "say /shop""say shop""radio1" 
-->
PHP Code:
new const Cmd[3][] = { 
"say /shop"
"say shop"
"radio1" 

try this..
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
oei
Junior Member
Join Date: Nov 2011
Old 11-01-2011 , 10:39   Re: why is dont work?
Reply With Quote #7

Quote:
Originally Posted by Korxu View Post
Try my code... but it is the same.
PHP Code:
for ( new 0sizeof Cmd ); ++ )
     
register_clcmd Cmd ], "shop" 
thx work

Last edited by oei; 11-01-2011 at 10:39.
oei is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 11-01-2011 , 10:47   Re: why is dont work?
Reply With Quote #8

Quote:
Originally Posted by Napoleon_be View Post
PHP Code:
new const Cmd[][] = { "say /shop""say shop""radio1" 
-->
PHP Code:
new const Cmd[3][] = { 
"say /shop"
"say shop"
"radio1" 

try this..
absolutely no difference exept you hardcoded how many commands there were
Erox902 is offline
Reply


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

Forum Jump


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


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