AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   VIP Plugin help (https://forums.alliedmods.net/showthread.php?t=318399)

DON KHAN 1 08-29-2019 08:06

VIP Plugin help
 
3 Attachment(s)
hi

i worked on a VIP plugin which have lot of features & have a own vip menu in which u can register ur any extra items like a aaarnas zp vip plugin.
i took some code from zp vip plugin to make a menu for extra items registration & other code by myself but when i compile so i got lot of errors i fixed lot of errors but now soome errors left . i am confused about cvars error
Errors List


hey guys help me out.

Edit: Forgot To Add WPMGPrintChatColor.inc Now Added.

edon1337 08-29-2019 08:11

Re: VIP Plugin help
 
How do you expect us to help when you haven't provided the necessary includes to compile the code? WPMGPrintChatColor.inc is missing

Also, start using local compiler.

DON KHAN 1 08-29-2019 08:16

Re: VIP Plugin help
 
oh sorry i forgot to add that.
added it.

i used local compiler too but i got same errors i fixed lot of error but the main confusion i have about the cvar idk how it is giving error.

edon1337 08-29-2019 08:29

Re: VIP Plugin help
 
This code has many major mistakes. Like, you're trying to use items enum without creating it first.
PHP Code:

new extra_items[items]

enum _:items
{
    
i_name[31],
    
i_description[31],
    
i_cost,
    
i_team


Why are you creating the array in the native handler!?
PHP Code:

public native_vm_register_extra_item(const item_name[], const item_discription[], item_costitem_team)
{
        if(!
items_databaseitems_database ArrayCreate(items

Why are you comparing an integer with a bitwise operator?
PHP Code:

if(g_team[id] & extra_items[i_team]) { 

These are some of the many mistakes.

LearninG 08-29-2019 08:44

Re: VIP Plugin help
 
are you sure that you created cvar variables ?
PHP Code:

new cvar_variable 


I AM NOOB 08-29-2019 09:08

Re: VIP Plugin help
 
As he said he just copied and pasted the codes from other plugin , you must change the code and make it suitable to use it

DON KHAN 1 08-29-2019 09:13

Re: VIP Plugin help
 
Quote:

Originally Posted by LearninG (Post 2665196)
are you sure that you created cvar variables ?
PHP Code:

new cvar_variable 


yes i created.
PHP Code:

new g_av_armorg_av_gravityg_av_fall_damageg_av_damage_increase 

Quote:

Originally Posted by I AM NOOB (Post 2665198)
As he said he just copied and pasted the codes from other plugin , you must change the code and make it suitable to use it


not whole code. just some code of vip menu damage & no fall damage code

LearninG 08-29-2019 10:15

Re: VIP Plugin help
 
This source has many problems.
I would suggest you , to remake it from zero , and not to copy paste random codes from other plugins.

Natsheh 08-29-2019 12:05

Re: VIP Plugin help
 
Quote:

Originally Posted by edon1337 (Post 2665195)
Why are you comparing an integer with a bitwise operator?
PHP Code:

if(g_team[id] & extra_items[i_team]) { 


This part seems fine what are you talking about basically it works like a == condition but I always recommend using a logic operators when comparin.

thEsp 08-29-2019 12:07

Re: VIP Plugin help
 
Quote:

Originally Posted by I AM NOOB (Post 2665198)
As he said he just copied and pasted the codes from other plugin , you must change the code and make it suitable to use it

Oh, you two insulting each other again? You've gotta be kidding me. PM each other for insults boys.


All times are GMT -4. The time now is 17:27.

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