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

[REQ] Fix Plugin Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 02-27-2020 , 09:36   [REQ] Fix Plugin Error
Reply With Quote #1

fix error plugin
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define ADMIN_FLAG ADMIN_LEVEL_H
#define SPEED 800.0


new boolcolorprint[33];
new 
boolspeed[33];

public 
plugin_init()
    
register_clcmd("say /menu""clcmd_vip"ADMIN_FLAG);

public 
clcmd_vip(idlevelcid){
    if(
is_user_alive(id) && cmd_access(idlevelcid3))
        return 
0;

    new 
menu menu_create("VIP Menu""handler");

    new 
formatex_colorprint[20], formatex_speed[20];
    
formatex(formatex_colorprintcharsmax(formatex_colorprint), "Color Print [%s]"colorprint[id] ? "Defult" "Light Blue" "Purpel" "Withe");

    
formatex(formatex_speedcharsmax(formatex_speed), "Speed [%s]"speed[id] ? "ON" "\rOFF\w");

    
menu_additem(menuformatex_gravity);
    
menu_additem(menuformatex_speed);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu);
    return 
0;
}

public 
handler(idmenuitem){
    switch(
item){
        case 
MENU_EXITmenu_destroy(menu);

        case 
0: {
            if(
colorprint[id]){
                
client_cmd(id"con_color ^"255 155 50^"")
            }

            else {
                
client_cmd(id"con_color ^"0 255 255^"")
            }
        else {
                
client_cmd(id"con_color ^"255 0 255^"")
            }
        else {
                
client_cmd(id"con_color ^"255 255 255^"")
            }
        }
        
        case 
1: {
            if(
speed[id]){
                
set_user_maxspeed(id400.0)
                
speed[id] = false;
            }

            else {
                
set_user_maxspeed(idSPEED);
                
speed[id] = true;
            }
        }
    }
    return 
1;


Last edited by alferd; 02-28-2020 at 00:48.
alferd is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-27-2020 , 13:27   Re: [REQ] Fix Plugin Error
Reply With Quote #2

What error?! What's that plugin even supposed to do?! Learn how to use the forum already.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 02-28-2020 , 00:57   Re: [REQ] Fix Plugin Error
Reply With Quote #3

PHP Code:
ss.sma(23) : error 001expected token","but found ":"
ss.sma(23) : error 029invalid expressionassumed zero
ss
.sma(23) : warning 215expression has no effect
ss
.sma(23) : error 001expected token";"but found ":"
ss.sma(23) : fatal error 107too many error messages on one line

Compilation aborted
.
4 Errors.
Done
Plugin work:
Code:
1.Color Print [Default/Light_Blue/Purple/White]
Code:
client_cmd(id, "con_color ^"255 155 50^"") Default
client_cmd(id, "con_color ^"0 255 255^"") Light_Blue
client_cmd(id, "con_color ^"255 0 255^"") Purple
client_cmd(id, "con_color ^"255 255 255^"") White
alferd is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-28-2020 , 06:37   Re: [REQ] Fix Plugin Error
Reply With Quote #4

And why is this in a VIP menu? What stops regular players from typing "con_color" in their console?...

The entire code is a joke - nothing in it is written or will work properly. Your best bet is to request a completely new plugin and explain what you want it to do. Make sure the things you want make actual sense.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 02-29-2020 , 04:28   Re: [REQ] Fix Plugin Error
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
And why is this in a VIP menu? What stops regular players from typing "con_color" in their console?...

The entire code is a joke - nothing in it is written or will work properly. Your best bet is to request a completely new plugin and explain what you want it to do. Make sure the things you want make actual sense.
The menu does this
watch:
https://www.youtube.com/watch?v=hLmO...ature=youtu.be
alferd 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 10:13.


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