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

Solved Best way of using or statments


Post New Thread Reply   
 
Thread Tools Display Modes
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 01-05-2019 , 13:08   Re: Best way of using or statments
Reply With Quote #11

Sounds like you want to kick people if they don't have the CS:GO Full Edition AND they didn't buy Prime either:

PHP Code:
if (k_EUserHasLicenseResultDoesNotHaveLicense == SteamWorks_HasLicenseForApp(client624820) &&
    
k_EUserHasLicenseResultDoesNotHaveLicense == SteamWorks_HasLicenseForApp(client54029))
{
    
KickClient(client"");
    return;

__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.

Last edited by DJ Tsunami; 01-05-2019 at 13:11.
DJ Tsunami is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 01-05-2019 , 13:20   Re: Best way of using or statments
Reply With Quote #12

Quote:
Originally Posted by TrullSin View Post
Not working, I get kicked and I have CS:GO for the last 2 years or more, and I got upgraded after the update.. I think that way is checking for the first and then it will check for the second and I dont have the appid 54029 because I didn't buy prime.
It's not a code problem.
https://forums.alliedmods.net/showth...71#post2628471

Quote:
Originally Posted by root88
Those Prime Upgraded players who bought game after 2018/12/06 don't get appid 624820 license, but they have CSGO Full Edition on their Steam accounts.
__________________
Ilusion9 is offline
TrullSin
Senior Member
Join Date: Jun 2018
Old 01-05-2019 , 13:31   Re: Best way of using or statments
Reply With Quote #13

Quote:
Originally Posted by DJ Tsunami View Post
Sounds like you want to kick people if they don't have the CS:GO Full Edition AND they didn't buy Prime either:

PHP Code:
if (k_EUserHasLicenseResultDoesNotHaveLicense == SteamWorks_HasLicenseForApp(client624820) &&
    
k_EUserHasLicenseResultDoesNotHaveLicense == SteamWorks_HasLicenseForApp(client54029))
{
    
KickClient(client"");
    return;

I want to if it has the CS:GO Full edition it will not check for prime, but if dont have CS:GO full edition it will check for prime
TrullSin is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 01-05-2019 , 14:20   Re: Best way of using or statments
Reply With Quote #14

That's what that code does. Each condition is true when the client does not have the license. So if they do have the CS:GO Full Edition, it will not check for Prime.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.

Last edited by DJ Tsunami; 01-05-2019 at 14:21.
DJ Tsunami is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-05-2019 , 15:21   Re: Best way of using or statments
Reply With Quote #15

Quote:
Originally Posted by brunoronning View Post
Thanks that link, very useful
Bacardi is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-06-2019 , 11:32   Re: Best way of using or statments
Reply With Quote #16

54029 is a sub ID, not an app ID, subscriptions are bundles of apps, and 54029 contains 624820. SteamWorks_HasLicenseForApp can only check for an app id.
__________________
asherkin is offline
ttasdasda
Member
Join Date: Apr 2014
Old 06-20-2019 , 21:43   Re: Best way of using or statments
Reply With Quote #17

So... has anyone found a working method of checking whether a user has the prime upgrade? I take it there's no way of checking against 54029 sub ID?
ttasdasda is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 06-25-2019 , 04:07   Re: Best way of using or statments
Reply With Quote #18

Quote:
Originally Posted by ttasdasda View Post
So... has anyone found a working method of checking whether a user has the prime upgrade? I take it there's no way of checking against 54029 sub ID?
still no solution here?
fragnichtnach is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 06-25-2019 , 07:42   Re: Best way of using or statments
Reply With Quote #19

Quote:
Originally Posted by fragnichtnach View Post
still no solution here?
nah
__________________
Psyk0tik 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 15:33.


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