Whats Wrong
#1

this is an atm fs supposed when im near the atm the atm dialog activates i did it before with a checkpoint but i wanted one without an icon in map so thought of this here is he code doesnt have any errors but doesnt work in game when i go to the atm help me

stock IsNearATM(playerid, Float:range = 1.5)
{
new Float, Float:y, Float:z;
GetObjectPos(ATM1, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, range, x, y ,z))
{
ShowPlayerDialog(playerid,1125,DIALOG_STYLE_LIST," San Fierro ATM","Deposit\nWithdraw\nBalance","Select","Cancel ");
SetPlayerHealth(playerid, 99999);
return 1;
}
else
{
SetPlayerHealth(playerid, 100);
return 1;
}
return 0;
}
Reply
#2

show ATM1's script
Reply
#3

and other thing i want when in in range my health is infinity as in god mode and when i finish using atm and out of range my life becoms 100 i did all that with checkpoint but cant seem to work here :/
Reply
#4

Quote:
Originally Posted by R0
Посмотреть сообщение
show ATM1's script
all the fs??
Reply
#5

Just Atm Code
Reply
#6

new pInfo[MAX_PLAYERS][PLAYER_MAIN];
new chosenpid;
new ATM1;

public OnFilterScriptInit()
{
ATM1 = CreateObject(2942, -2029.1999511719, 454.54998779297, 34.799999237061, 0, 0, 180);
SetTimer("Contack",1,0);
return 1;
}
this is the atm the other stuff are the tele and the system of it the dialog the save money the main idea of this atm is it saves ur money u can deposit,withdraw,and see ur balance and saves with mysql in a folder bank in scriptfiles thats it
Reply
#7

Having the function does nothing. Do you actually call it somewhere?

And by the way, setting the health to 100 everytime a player is not in range of the point is bad. Just set it after they close the dialog.
Reply
#8

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Having the function does nothing. Do you actually call it somewhere?

And by the way, setting the health to 100 everytime a player is not in range of the point is bad. Just set it after they close the dialog.
hmmm wanna see the whole script of the atm its a script for atm only like 120 lines http://pastebin.com/ypfMy9ww
Reply
#9

no hope or wht xD
Reply
#10

you shouldn't set the health back to 100, lets say the player has 20hp and he quickly uses the atm to gain 100hp.

you should use something called https://sampwiki.blast.hk/wiki/GetPVarFloat to store the HP and then use https://sampwiki.blast.hk/wiki/SetPVarFloat.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)