Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43261
Total Topics: 7519
Most Online Today: 297
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 293
Total: 293

Author Topic: Issuing credits for games played in the arcade?  (Read 4987 times)

0 Members and 1 Guest are viewing this topic.

Offline hoozah

  • Member
  • *
  • Posts: 23
    • View Profile
Issuing credits for games played in the arcade?
« on: September 12, 2015, 01:15:07 am »
Hello SMFHacks,

Just wondering if it were possible for members to earn credits from playing games in the arcade. Ever since I implemented it, it's been quite popular  ;)

Thanks again for any response to this.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Issuing credits for games played in the arcade?
« Reply #1 on: September 12, 2015, 04:51:43 pm »
What type of credits? I can't tell if someone is playing game but can detect if they click on the play link/view the arcade game itself.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline hoozah

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Issuing credits for games played in the arcade?
« Reply #2 on: September 12, 2015, 09:49:23 pm »
Hey SMFHacks,

The same type of credits being given out when posting and used in the shop mod.

I'd like to offer some credits for every 'play' in the arcade.

Hope that clears things up! Thanks again.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Issuing credits for games played in the arcade?
« Reply #3 on: September 12, 2015, 10:38:23 pm »
Here is the code i use for SMF 2.0.X Adds one credit to shop
Code: [Select]
global $user_info;
$smcFunc['db_query']('', "UPDATE {db_prefix}members
SET money = money + 1
WHERE id_member = " . $user_info['id'] . "
LIMIT 1");

Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline hoozah

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Issuing credits for games played in the arcade?
« Reply #4 on: September 13, 2015, 12:26:05 am »
Thanks!

Can you tell me where I would paste this code?  ;)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Issuing credits for games played in the arcade?
« Reply #5 on: September 13, 2015, 05:26:41 pm »
After each play add here in sources/arcadegame.php

Code: [Select]

if (!$context['game'] = getGameInfo(isset($_REQUEST['random']) ? 'random' : $_REQUEST['game']))
fatal_lang_error('arcade_game_not_found', false);

$system = SubmitSystemInfo($context['game']['submit_system']);
require_once($sourcedir . '/' . $system['file']);

$isCustomGame = $context['game']['submit_system'] == 'custom_game';


Or after each submission
Code: [Select]
$submit_info = $system['info']($context['game'], $session_info);

if (!$submit_info || isset($submit_info['error']))
fatal_lang_error('arcade_submit_error', false);
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline hoozah

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Issuing credits for games played in the arcade?
« Reply #6 on: September 19, 2015, 04:13:46 pm »
Thanks SMFhacks - as always, you have been very helpful.

Also, where in the files are the pictures (for the arcade) located? I could not locate them in the sources files.

**nevermind - found them under themes / images  ;)
« Last Edit: September 19, 2015, 04:16:01 pm by hoozah »

Offline hoozah

  • Member
  • *
  • Posts: 23
    • View Profile
Re: Issuing credits for games played in the arcade?
« Reply #7 on: September 20, 2015, 08:55:48 pm »
Another quick question SMFHacks -

Does the e-arcade support the download and installation of individual SWF games? I was able to locate and install some gamepacks, but having issues installing SWF games individually.

Thanks again for your ongoing support.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Issuing credits for games played in the arcade?
« Reply #8 on: September 20, 2015, 09:08:44 pm »
Haven't done anything with earcade in while so not sure. Gave up on it when the approval process was too long on SMF.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
6099 Views
Last post June 23, 2006, 08:29:26 am
by SMFHacks
11 Replies
12973 Views
Last post August 27, 2007, 10:30:23 am
by loud
4 Replies
6704 Views
Last post January 01, 2008, 06:06:54 pm
by SMFHacks
0 Replies
3707 Views
Last post August 22, 2008, 02:10:03 pm
by LeisureSuitLarry
2 Replies
2779 Views
Last post February 03, 2016, 10:24:55 pm
by Puppeteer

+- Recent Topics

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
Today at 08:27:36 am

No thumbnails on new uploads by Tonyvic
Today at 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Powered by EzPortal