已关闭

SteamApi function to check if owned a game

So i have this code

//REFERRALS CMDS

[url removed, login to view]('referrals use code', function(code, csrf) {

var address = [url removed, login to view]['x-forwarded-for'] || [url removed, login to view];

if(coolDown[address]+1 >= time()) {

[url removed, login to view]('message', {

type: 'msg',

tip: 'error',

msg: 'We are already processing one of your requests, please be patient.'

});

return;

} else {

coolDown[address] = time()+1;

}

if(csrf && code)

{

if(!steamIDCsrf[csrf]['code_used'])

{

[url removed, login to view]('SELECT steamid FROM users WHERE codeCreated = ' + [url removed, login to view](code), function(e, r) {

if(e) throw e;

if([url removed, login to view] == 0)

{

[url removed, login to view]('message', {

type: 'msg',

tip: 'error',

msg: 'This code does not exist.'

});

}

else

{

if(r[0].steamid == steamIDCsrf[csrf]['steamid'])

{

[url removed, login to view]('message', {

type: 'msg',

tip: 'error',

msg: 'You cannot redeem your own code.'

});

return;

}

if((/^([a-zA-Z0-9]{1,12})$/.test(code)) == true)

{

[url removed, login to view]('UPDATE users SET balance = balance + 100, codeUsed = ' + [url removed, login to view](code) + ', referral = ' + [url removed, login to view](r[0].steamid) + ' WHERE steamid = ' + [url removed, login to view](steamIDCsrf[csrf]['steamid']), function(ccc, bbb) {

[url removed, login to view]('UPDATE users SET ref_balance = ref_balance + 15 WHERE steamid = ' + [url removed, login to view](r[0].steamid), function(jk, kj) {

newBalance(csrf);

steamIDCsrf[csrf]['code_used'] = code;

[url removed, login to view]('message', {

type: 'msg',

tip: 'alert',

msg: 'You successfully redeem code ' + code + '.'

});

});

});

}

else

{

[url removed, login to view]('message', {

type: 'msg',

tip: 'error',

msg: 'Invalid characters or the code have more than 12 characters.'

});

return;

}

}

});

}

}

});

And i want to add function to verify if steam profile have game pubg

i have someting for this but no work i want to integrate this

var out;

out = curl("[url removed, login to view]" + user["steamid"] + "&format=json");

out = json_decode(out, true);

if (!out["response"]) {

throw new Exit(json_encode({

"success": false,

"error": "You profile is private"

}));;

}

var csgo;

csgo = false;

var key;

__loop1:

for (key in out["response"]["games"]) {

var value;

value = out["response"]["games"][key];

if (value["appid"] == 578080) {

csgo = true;

}

}

if (!csgo) {

throw new Exit(json_encode({

"success": false,

"error": "You dont have PUBG."

}));;

}

to first code

技能: Java, Javascript, PHP, Steam API

关于此雇主:
( 0个评论 ) Romania

项目ID: #15812014

3 威客就此工作平均出价 $30

Beannsofts

Check our many good reviews from our satisfied customers in software and websites development. We will make you happy Relevant Skills and Experience developer Stay tuned, I'm still working on this proposal.

$21 USD 在7天内
(25条评论)
4.8
Hoffffi

I can face this node.js script I have experience with steam gambling sites (csgo, dota2) and also with bots to roulette sites.

$15USD 在1天里
(3条评论)
2.2
mikhailkozalski

Hi If you hire me, i will complete your project perfectly. I am interested in your project. I want to have a talk with you about your project in detail. Relevant Skills and Experience Java, Javascript, PHP, Steam API 更多

$55USD 在1天里
(0条评论)
0.0