withdraw money, to sa-mp game
#2

First you have to understand how all of this works and what is frontend and backend term used for. Once you understand the basic structure of it you can create these types of systems very easily.

This will help you understand things :

My paint skills are not the best :/

To interact from frontend -> backend:
It is generally done by passing the info through GET or POST method using javascript(generally done by using ajax method provided in jQuery lib of javascript).

Backend -> Frontend:
When frontend makes a request to backend the backend returns info by printing it in output(example by echo'ing in php). Now generally we use JSON object to pass the info like this. How to use this? Its simple like this :
PHP код:
<?php
//backend part
$info = array('userid' => 1'name' => "username"'cash' => 5000);
echo 
json_encode($info);
?>
Now when you receive it in frontend(in javascript) you can use $.parseJSON() method to again convert it into array from and use it as you desire.

Backend does changes in db and same changes are reflected in server as they share same db.
Reply


Messages In This Thread
withdraw money, to sa-mp game - by MerryDeer - 21.02.2017, 05:41
Re: withdraw money, to sa-mp game - by BroZeus - 21.02.2017, 06:59
Re: withdraw money, to sa-mp game - by MerryDeer - 21.02.2017, 09:48
Re: withdraw money, to sa-mp game - by BroZeus - 21.02.2017, 11:39
Re: withdraw money, to sa-mp game - by MerryDeer - 21.02.2017, 12:19
Re: withdraw money, to sa-mp game - by Sew_Sumi - 21.02.2017, 13:49
Re: withdraw money, to sa-mp game - by MerryDeer - 21.02.2017, 14:57
Re: withdraw money, to sa-mp game - by BroZeus - 21.02.2017, 15:00
Re: withdraw money, to sa-mp game - by MerryDeer - 21.02.2017, 15:03
Re: withdraw money, to sa-mp game - by MerryDeer - 23.02.2017, 14:11

Forum Jump:


Users browsing this thread: 1 Guest(s)