02.11.2011, 21:56
you can try like this
Forward
The callback
Код:
CMD:pphone(playerid,parms[]) { if(IsNearPPhone(playerid)) { and here you can put dialog } else SendClientMessage(playerid,-1,"ERROR: You are not near public phone.."); return true; }
Код:
forward IsNearPPhone(playerid);
Код:
public IsNearPPhone(playerid) { if(IsPlayerInRangeOfPoint(playerid, 4,x,y,z) || IsPlayerInRangeOfPoint(playerid, 4,x,y,z)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 4,x,y,z) || IsPlayerInRangeOfPoint(playerid, 4,x,y,z)) { return 1; } return 0; }