Raised This Month: $51 Target: $400
 12% 

Solved HELP. tool change plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
baskin
Junior Member
Join Date: Feb 2019
Old 02-09-2019 , 06:23   HELP. tool change plugin
Reply With Quote #1

Hi, I'm trying to write my first plugin but I have a problem and couldn't figure it out.

I want to create a main menu and a submenu in my plugin. In this submenu, I would like to list the contacts on the server and make the selection. I couldn't figure it out because the selected user had to switch teams.

The plug-in turns seamlessly into the smx file, but when I load it on the server it gives an error when using the command and the panel doesn't open

PHP Code:
new Handle:submenu CreateMenu(HDTMenuTakim); 
                
SetMenuTitle(submenu"TAKIM DEGIS"); 
                for(new 
1<= MaxClientsi++){ 
                    
decl String:TargetName[512]; 
                    
GetClientName(iTargetNamesizeof(TargetName)); 
                    
AddMenuItem(submenuTargetNameTargetName); 
                } 
                
SetMenuExitButton(submenutrue); 
                
DisplayMenu(submenuclientMENU_TIME_FOREVER); 

------------------------------------------ 



new 
target = -1
            new 
String:info[512]; 
            
GetMenuItem(menuTargetUserinfosizeof(info)); 
             
            for(new 
1<= MaxClientsi++){ 
                 
                if(!
IsClientInGame(i)){ 
                    continue; 
                } 

                
decl String:other[512]; 
                
GetClientName(iothersizeof(other)); 

                if(
StrEqual(infoother)){ 
                    
target i
                } 
             
            } 

            if(
GetClientTeam(target) != 2){ 

                
ChangeClientTeam(target2); 

            }else if(
GetClientTeam(target) != 3){ 

                
ChangeClientTeam(target3); 

            } 

Last edited by baskin; 02-12-2019 at 11:19. Reason: Restore to previous version. + Solved tag
baskin 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:44.


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