Raised This Month: $ Target: $400
 0% 

help easy plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sambe
BANNED
Join Date: Sep 2011
Old 09-10-2011 , 13:45   help easy plugins
Reply With Quote #1

1. How to create one if you write a plugin to the chat command /teste the command will be executed in a chat that will not be displayed?
2. How to create one plugin to mount a weapon did not end!
3. Explain please what is meant by the number 32?
Code:
new szItemName[32], szItemName2[32];
If I change 32 to say 80 what will change?
Thank you in advance.

Last edited by sambe; 09-10-2011 at 13:53.
sambe is offline
OFFBEAT
Junior Member
Join Date: Feb 2011
Location: Sweden
Old 09-10-2011 , 14:51   Re: help easy plugins
Reply With Quote #2

PHP Code:
new szItemName[32
Is creating a new array which store a maxsize of 32, I suggest you read some ground tutorials on arrays.

An example of the maxsize use, max number of players on a server is 32 and you want to store a value on each and one player:
PHP Code:
new iPlayers[32], iValue;
for( new 
0get_maxplayers( ); i++ )
{
      if( 
is_user_connected) )
            
iPlayers[i] = iValue;

the size starts at 0 on the array, so if i want first value of the array I'd use something like:
PHP Code:
new iFirstValue iPlayers[0]; 
I hope you get the number assignment
OFFBEAT is offline
sambe
BANNED
Join Date: Sep 2011
Old 09-10-2011 , 15:11   Re: help easy plugins
Reply With Quote #3

Quote:
Originally Posted by OFFBEAT View Post
PHP Code:
new szItemName[32
Is creating a new array which store a maxsize of 32, I suggest you read some ground tutorials on arrays.

An example of the maxsize use, max number of players on a server is 32 and you want to store a value on each and one player:
PHP Code:
new iPlayers[32], iValue;
for( new 
0get_maxplayers( ); i++ )
{
      if( 
is_user_connected) )
            
iPlayers[i] = iValue;

the size starts at 0 on the array, so if i want first value of the array I'd use something like:
PHP Code:
new iFirstValue iPlayers[0]; 
I hope you get the number assignment
Thank you.
[1].[2] up
sambe is offline
sambe
BANNED
Join Date: Sep 2011
Old 09-12-2011 , 11:56   Re: help easy plugins
Reply With Quote #4

up
sambe 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 06:01.


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