24.07.2012, 16:05
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/fshop", cmdtext, true, 10) == 0) if (PlayerToPoint(3, playerid,1579.5493, -1635.6027, 13.5608)) { ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Fighting Style List", "|-> Normal Fighting Styles\n|-> Boxing\n|-> Kungfu\n|-> KneeHead\n|-> GrabKick\n|-> Elbow", "Buy", "Close"); } return 1; }
Код:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) { new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return true; } return false; }
Код:
//----<Forwards>----// forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);