12.07.2010, 20:36
Well I don't know the object id of the ATM machine but you can find it out.
Use the following functions:
CreateObject @ the WIKI
Then check if the player is near an ATM machine where you have the command for the withrawal.
IsPlayerInRangeOfPoint @ the WIKI
EDIT: Yea like Grim_ said.
Use the following functions:
Код:
new atm = CreateObject(...................);
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; }
EDIT: Yea like Grim_ said.