Raised This Month: $32 Target: $400
 8% 

Problem with my VIPMENU CODE


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
scarlxrd1734
Junior Member
Join Date: Jul 2018
Location: Portugal
Old 07-22-2018 , 17:35   Problem with my VIPMENU CODE
Reply With Quote #1

Hi guys. I am building a VIPMENU. When i try to compile it shows me na error. Thats the #include part and the Error part.

Lines 1 to 5:

#include <sourcemod>
#include <cstrike>
#include <colors>
#include <sdktools>
#include <sdktools_hooks>

And on the line 472-475 i have this:

public void OnClientPutInServer(int client)
{
SDKHook(client, SDKHook_WeaponEquipPost, EventItemPickup2);
}

When i compile its says that error:

// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(474) : error 017: undefined symbol "SDKHook"


if someone can help comment that post, send me a private message or contact me on steam: https://steamcommunity.com/id/scarlxrdcfg
scarlxrd1734 is offline
Vaggelis
Senior Member
Join Date: May 2017
Old 07-22-2018 , 17:36   Re: Problem with my VIPMENU CODE
Reply With Quote #2

#include <sdkhooks>
Vaggelis is offline
scarlxrd1734
Junior Member
Join Date: Jul 2018
Location: Portugal
Old 07-23-2018 , 12:07   Re: Problem with my VIPMENU CODE
Reply With Quote #3

Quote:
Originally Posted by Vaggelis View Post
#include <sdkhooks>

i just need to add #include <sdkhooks> ?
scarlxrd1734 is offline
scarlxrd1734
Junior Member
Join Date: Jul 2018
Location: Portugal
Old 07-23-2018 , 12:13   Re: Problem with my VIPMENU CODE
Reply With Quote #4

Quote:
Originally Posted by Vaggelis View Post
#include <sdkhooks>

Thanks i added the #include <sdkhooks> and it fixed the error but now when i compile it shows me another:

C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(475) : error 017: undefined symbol "EventItemPickup2"

i have this on the code now:

#include <sourcemod>
#include <cstrike>
#include <colors>
#include <sdktools>
#include <sdktools_hooks>
#include <sdkhooks>




public void OnClientPutInServer(int client)
{
SDKHook(client, SDKHook_WeaponEquipPost, EventItemPickup2);
}


Thanks for your help ;)

Last edited by scarlxrd1734; 07-23-2018 at 12:13.
scarlxrd1734 is offline
Vaggelis
Senior Member
Join Date: May 2017
Old 07-23-2018 , 12:58   Re: Problem with my VIPMENU CODE
Reply With Quote #5

https://sm.alliedmods.net/new-api/sdkhooks/SDKHook
Vaggelis is offline
Santi.
Member
Join Date: Oct 2010
Location: Cordoba(Argentina)
Old 07-29-2018 , 02:38   Re: Problem with my VIPMENU CODE
Reply With Quote #6

Your EventItemPickup2 method should have a firm like this: void EventItemPickup2(int client, int weapon)
Santi. is offline
scarlxrd1734
Junior Member
Join Date: Jul 2018
Location: Portugal
Old 07-29-2018 , 06:57   Re: Problem with my VIPMENU CODE
Reply With Quote #7

Quote:
Originally Posted by Santi. View Post
Your EventItemPickup2 method should have a firm like this: void EventItemPickup2(int client, int weapon)
First thanks for your help. i added that command on the OnPluginStart and i got that errors:

// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(475) : error 017: undefined symbol "EventItemPickup2"
// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(476) : error 001: expected token: ";", but found "("
// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(476) : error 029: invalid expression, assumed zero
// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(476) : error 029: invalid expression, assumed zero
// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(476) : fatal error 190: too many error messages on one line
scarlxrd1734 is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 07-29-2018 , 19:32   Re: Problem with my VIPMENU CODE
Reply With Quote #8

Quote:
Originally Posted by scarlxrd1734 View Post
First thanks for your help. i added that command on the OnPluginStart and i got that errors:

// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(475) : error 017: undefined symbol "EventItemPickup2"
// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(476) : error 001: expected token: ";", but found "("
// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(476) : error 029: invalid expression, assumed zero
// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(476) : error 029: invalid expression, assumed zero
// C:\csgo_awp_test\csgo\addons\sourcemod\script ing\scarlxrd_vipmenu_surfcombat.sp(476) : fatal error 190: too many error messages on one line
He meant to put it as the callback, not inside of a function...

PHP Code:
public void EventItemPickup2(int clientint weapon)
{
    if (
IsValidEdict(weapon) && client <= MaxClients)
    {
        
// Your code...    
    
}

__________________

Last edited by LenHard; 07-29-2018 at 19:33.
LenHard is offline
scarlxrd1734
Junior Member
Join Date: Jul 2018
Location: Portugal
Old 07-31-2018 , 06:20   Re: Problem with my VIPMENU CODE
Reply With Quote #9

Quote:
Originally Posted by LenHard View Post
He meant to put it as the callback, not inside of a function...

PHP Code:
public void EventItemPickup2(int clientint weapon)
{
    if (
IsValidEdict(weapon) && client <= MaxClients)
    {
        
// Your code...    
    
}


First of all thanks for your help! Second, I COULD COMPILE IT THANKS SO MUUUUUUUUTCH!

Last edited by scarlxrd1734; 07-31-2018 at 06:24.
scarlxrd1734 is offline
Reply


Thread Tools
Display Modes

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 19:10.


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