27.05.2014, 16:51
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;
}

stock IsNearATM(playerid, Float:range = 1.5)
{
new Float

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;
}