22.04.2012, 15:24
Das linhas 221 a 230
Linha 698:
Linha 703 a 711:
Код:
if(PlayerToPointStripped(0.5, playerid, GunPlace[0][0],GunPlace[0][1],GunPlace[0][2], cx, cy ,cz) || PlayerToPointStripped(0.5, playerid, GunPlace[1][0],GunPlace[1][1],GunPlace[1][2], cx, cy ,cz) || PlayerToPointStripped(0.5, playerid, GunPlace[2][0],GunPlace[2][1],GunPlace[2][2], cx, cy ,cz) || PlayerToPointStripped(0.5, playerid, GunPlace[3][0],GunPlace[3][1],GunPlace[3][2], cx, cy ,cz) || PlayerToPointStripped(0.5, playerid, GunPlace[4][0],GunPlace[4][1],GunPlace[4][2], cx, cy ,cz)) { if (PlayerLookAtGun[playerid] == 0) { TextDrawShowForPlayer(playerid,Text1); TextDrawShowForPlayer(playerid,Text2); TextDrawShowForPlayer(playerid,Background); } } else if(PlayerToPointStripped(0.5, playerid, GunPlace[5][0],GunPlace[5][1],GunPlace[5][2], cx, cy ,cz) || PlayerToPointStripped(0.5, playerid, GunPlace[6][0],GunPlace[6][1],GunPlace[6][2], cx, cy ,cz) || PlayerToPointStripped(0.5, playerid, GunPlace[7][0],GunPlace[7][1],GunPlace[7][2], cx, cy ,cz) || PlayerToPointStripped(0.5, playerid, GunPlace[8][0],GunPlace[8][1],GunPlace[8][2], cx, cy ,cz) || PlayerToPointStripped(0.5, playerid, GunPlace[9][0],GunPlace[9][1],GunPlace[9][2], cx, cy ,cz)) { if (PlayerLookAtGun[playerid] == 0) { TextDrawShowForPlayer(playerid,Text1); TextDrawShowForPlayer(playerid,Text2); TextDrawShowForPlayer(playerid,Background); } } else if(PlayerToPointStripped(0.5, playerid, GunPlace[10][0],GunPlace[10][1],GunPlace[10][2], cx, cy ,cz) || PlayerToPointStripped(0.5, playerid, GunPlace[11][0],GunPlace[11][1],GunPlace[11][2], cx, cy ,cz) || PlayerToPointStripped(0.5, playerid, GunPlace[12][0],GunPlace[12][1],GunPlace[12][2], cx, cy ,cz))
Код:
public PlayerToPointStripped(Float:radi, playerid, Float:x, Float:y, Float:z, Float:curx, Float:cury, Float:curz)
Код:
if(IsPlayerConnected(playerid)) { new Float:tempposx, Float:tempposy, Float:tempposz; tempposx = (curx -x); tempposy = (cury -y); tempposz = (curz -z); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1; } return 0; }