02.11.2011, 21:16
Please can some1 post me link where is explained how to make public phone or make for me tutorial for public phone.
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; }
you can try like this
Код:
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; } |