Fermé

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

Compétences : Java, Javascript, PHP, Steam API

en voir plus :

Concernant l'employeur :
( 0 commentaires ) Romania

Nº du projet : #15812014

3 freelance font une offre moyenne de $30 pour ce travail

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.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(25 Commentaires)
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.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(3 Commentaires)
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 Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0