Raised This Month: $ Target: $400
 0% 

VIP Plugin help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-29-2019 , 08:29   Re: VIP Plugin help
Reply With Quote #1

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.
__________________

Last edited by edon1337; 08-29-2019 at 08:32.
edon1337 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-29-2019 , 12:05   Re: VIP Plugin help
Reply With Quote #2

Quote:
Originally Posted by edon1337 View Post
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.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-29-2019 at 12:07.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-29-2019 , 12:18   Re: VIP Plugin help
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
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.
It will work, but he's confusing himself.
PHP Code:
if(extra_items[i_team] == || g_team[id] & extra_items[i_team]) { 
__________________
edon1337 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 17:27.


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