0 Members and 1 Guest are viewing this topic.
Quote from: dragus on November 15, 2008, 06:56:18 amwhat is commends in this scriptsReading helps.Quote from: tk on November 10, 2008, 04:17:33 pmFull Description: In version for admin use the /mss command to launch the missile.
what is commends in this scripts
Full Description: In version for admin use the /mss command to launch the missile.
I must have just skipped over it lol. The download link wont work for me
Quote from: miketh2005 on July 10, 2009, 07:31:20 pmDonate to enesceHAHAHAHAHAHAHA
Donate to enesce
Hehe I made something very similar to this once.What would be awesome would be mod-ing say, the law or something to shoot this kind of thing.
Quote from: iDante on November 10, 2008, 04:34:19 pmHehe I made something very similar to this once.What would be awesome would be mod-ing say, the law or something to shoot this kind of thing.GROM (Missile launcher) anyone?Love it!
[inside apponidle] for i := 1 to 32 do if getplayerstat(i, 'active') then if (getplayerstat(i, 'primary') = 14) and (getkeypress(i, 'shoot')) // i'm not sure if LAW is #14 and ((getkeypress(i, 'prone')) or (getkeypress(i, 'crouch'))) // players need to crouch to shoot, delete this line to allow shooting while standing then [shoot the missile]
if victim = shooter then if GetPlayerStat(shooter,'Primary') = 16 then{ i think law is 16} if GetPlayerStat(shooter,'Ammo') = 0 then { player has shot } if (getkeypress(shooter, 'prone')) or (getkeypress(shooter, 'crouch') then begin target:=NearestTarget(...); if target = 0 then exit; Missile(shooter, target, GetPlayerStat(shooter,'x'), GetPlayerStat(shooter,'y')); // or the second possibility ThreadFunc([shooter, target, GetPlayerStat(shooter,'x'), GetPlayerStat(shooter,'y')],'Missile'); end;
function OnCommand(ID: Byte; Text: string): boolean;beginif GetPiece(Text,' ',0) = '/aim' then beginMissile(ID,GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'ID'),GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'X'),GetPlayerStat(strtoint(GetPiece(Text,' ',1)), 'Y'),);end;Result := false;end;
function lookForTarget(ID: byte; MinDistance, MaxDistance: integer; UsingRaycast: boolean): byte;var i,Team: byte; X,Y,X2,Y2,sqrdist,maxdist: single;begin GetPlayerXY(ID,X,Y); maxdist:=MaxDistance*MaxDistance; Result:=0; Team := GetPlayerStat(ID, 'Team'); for i:=1 to 32 do if i <> ID then if GetPlayerStat(i, 'Active') then if GetPlayerStat(i, 'Alive') then if GetPlayerStat(i, 'team') <> Team then begin GetPlayerXY(i,X2,Y2); if UsingRayCast then if not RayCast(X,Y-7,X2,Y2-7,sqrdist,MaxDistance+1) then continue; X2:=X2-X; Y2:=Y2-Y; sqrdist:=X2*X2+Y2*Y2; if (sqrdist < maxdist) and (sqrdist >= MinDistance) then begin Result:=i; maxdist:=sqrdist; end; end;end;function OnCommand(ID: Byte; Text: string): boolean;var x, y: single; target: byte;begin if Text = '/aim' then begin target := lookForTarget(ID, 0, 700, true); if target > 0 then begin GetPlayerXY(ID, x, y); Missile(ID, target, x, y); end; end; Result := false;end;