SA-MP Forums Archive
detection of fire hose - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: detection of fire hose (/showthread.php?tid=204170)



detection of fire hose - The_Gangstas - 29.12.2010

pawn Код:
stock IsPlayerAimingAt(playerid, Float:x, Float:y, Float:z, Float:radius)
{
    new Float:cx,Float:cy,Float:cz,Float:fx,Float:fy,Float:fz;
    GetPlayerCameraPos(playerid, cx, cy, cz);
    GetPlayerCameraFrontVector(playerid, fx, fy, fz);
    return (radius >= DistanceCameraTargetToLocation(cx, cy, cz, x, y, z, fx, fy, fz));
}

if(IsPlayerAimingAt(playerid, FireInfo[i][fPos][0],  FireInfo[i][fPos][1],  FireInfo[i][fPos][2], 1) && IsPlayerInRangeOfPoint(playerid, 13, FireInfo[i][fPos][0],  FireInfo[i][fPos][1],  FireInfo[i][fPos][2]))
                        {
seems to not work totally correct.


Re: detection of fire hose - The_Gangstas - 29.12.2010

bump