ATM System
#1

How can i put an ATM Systen in my server...

HELP ME =D
Reply
#2

Did you try to search?
Reply
#3

Yes but i want your advices about that....
What is better, the functions, etc...
Reply
#4

You mean Automatic Teller Machines where players can withdraw cash?
Reply
#5

Quote:
Originally Posted by DJDhan
Посмотреть сообщение
You mean Automatic Teller Machines where players can withdraw cash?
Yes he does. He means "Automatic Teller Machines" a.k.a. "ATM".
Reply
#6

yes PLEASE HELP!!!
Reply
#7

Just make the object for the ATM.

Then when you make a command, like /withdraw, check if they're near it using IsPlayerInRangeOfPoint().

If they are, give them the money if it's less than what they have in their bank account.

Most of the code will have to be done by you because we do not know how you save the amount of cash the player has, or the variables used.
Reply
#8

Well I don't know the object id of the ATM machine but you can find it out.
Use the following functions:

Код:
new atm = CreateObject(...................);
CreateObject @ the WIKI

Then check if the player is near an ATM machine where you have the command for the withrawal.

Код:
if(!strcmp(cmdtext,"/withdraw",true))
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    if(!IsPlayerInRangeOfPoint(playerid,xofatm,yofatm,zofatm,range)) return SendClientMessage(playerid,0xffffffaa,"You are not near an ATM.");
    
    //rest of the code
    return 1;
}
IsPlayerInRangeOfPoint @ the WIKI


EDIT: Yea like Grim_ said.
Reply
#9

I Have crieted 1 ATM.

I dont have the command to work.

If i put this:

if(!strcmp(cmdtext,"/withdraw",true))
{
new Float,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
if(!IsPlayerInRangeOfPoint(playerid,xofatm,yofatm, zofatm,range)) return SendClientMessage(playerid,0xffffffaa,"You are not near an ATM.");

//rest of the code
return 1;
}

This will work?? and where is the command to trasnfere etc....
Reply
#10

You'll need to add the code to give the player the money and change the values of 'xofatm', 'yofatm' etc to the actual coordinates of where you added the ATM.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)