0 Members and 4 Guests are viewing this topic.
const Color = $FFFFFFFF; MaxDist = 65; MaxHealth = 65; HealRate = 8;var Medic: array[1..2] of byte;procedure AppOnIdle(Ticks: integer);var i,j: byte; X,Y: single;begin for i := 1 to 2 do begin GetPlayerXY(Medic[i],X,Y); if Medic[i] <> 0 then if GetPlayerStat(Medic[i],'Alive') = true then for j := 1 to 32 do if (GetPlayerStat(j,'Active') = true) and (GetPlayerStat(j,'Alive') = true) and (GetPlayerStat(Medic[i],'Team') = GetPlayerStat(j,'Team')) and (Distance(X,Y,GetPlayerStat(j,'X'),GetPlayerStat(j,'Y')) <= MaxDist) and (GetPlayerStat(j,'Health') < MaxHealth) then begin if GetPlayerStat(j,'Health') + HealRate > MaxHealth then DoDamage(j,GetPlayerStat(j,'Health') - MaxHealth) else DoDamage(j,-HealRate); end; end;end;procedure OnJoinGame(ID, Team: byte);begin if Medic[Team] = 0 then WriteConsole(ID,'Medic is up for grabs on your team. Type !medic to claim it.',Color);end;procedure OnJoinTeam(ID, Team: byte);var OTeam: byte;begin if Team = 1 then OTeam := 2 else OTeam := 1; if Medic[OTeam] = ID then begin Medic[OTeam] := 0; WriteConsole(0,'Medic for team #' + InttoStr(OTeam) + ' is up for grabs. Type !medic to claim it.',Color); end;end;procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);begin if Medic[Team] = ID then begin Medic[Team] := 0; WriteConsole(0,'Medic for team #' + InttoStr(Team) + ' is up for grabs. Type !medic to claim it.',Color); end;end;procedure OnMapChange(NewMap: string);var i: byte;begin for i := 1 to 2 do Medic[i] := 0; WriteConsole(0,'Medic is now up for grabs for both teams. Type !medic to claim it.',Color);end;procedure OnPlayerSpeak(ID: byte; Text: string);var Team: byte;begin if (Text = '!medic') then begin Team := GetPlayerStat(ID,'Team'); if Medic[Team] = 0 then begin Medic[Team] := ID; WriteConsole(ID,GetPlayerStat(ID,'Name') + ' has claimed medic for team #' + InttoStr(Team) + '.',Color); end else WriteConsole(ID,'Medic has already been claimed by ' + GetPlayerStat(Medic[Team],'Name') + '.',Color); end;end;
I fixed it, with a little help from EagleEye.
My new password is secure as shit Mate, I am not sure Shit is even secured nowadays.
Quote from: DorkeyDear on August 13, 2007, 08:18:37 pmI fixed it, with a little help from EagleEye.Same thing happens with Admin invinibility, it's annoying and it causes....... sh@@ It happened just now.....FIXED ARSSE always messes up saying out of memory and I have to Force CLose
WTF are you talking bout?! ww2 is fiction feckergot.
How close does the player have to be to the medic? I think I might use this.
const Color = $FFFFFFFF; MaxDist = 65; MaxHealth = 65; HealRate = 8;var Medic: array[1..2] of byte;procedure AppOnIdle(Ticks: integer);var i,j: byte; X,Y: single;begin for i := 1 to 2 do begin GetPlayerXY(Medic[i],X,Y); if Medic[i] <> 0 then if GetPlayerStat(Medic[i],'Alive') = true then for j := 1 to 32 do if (GetPlayerStat(j,'Active') = true) and (GetPlayerStat(j,'Alive') = true) and (GetPlayerStat(Medic[i],'Team') = GetPlayerStat(j,'Team')) and (Medic[i] <> j) and (Distance(X,Y,GetPlayerStat(j,'X'),GetPlayerStat(j,'Y')) <= MaxDist) and (GetPlayerStat(j,'Health') < MaxHealth) then begin if GetPlayerStat(j,'Health') + HealRate > MaxHealth then DoDamage(j,GetPlayerStat(j,'Health') - MaxHealth) else DoDamage(j,-HealRate); end; end;end;procedure OnJoinGame(ID, Team: byte);begin if Medic[Team] = 0 then WriteConsole(ID,'Medic is up for grabs on your team. Type !medic to claim it.',Color);end;procedure OnJoinTeam(ID, Team: byte);var OTeam: byte;begin if Team = 1 then OTeam := 2 else OTeam := 1; if Medic[OTeam] = ID then begin Medic[OTeam] := 0; WriteConsole(0,'Medic for team #' + InttoStr(OTeam) + ' is up for grabs. Type !medic to claim it.',Color); end;end;procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);begin if Medic[Team] = ID then begin Medic[Team] := 0; WriteConsole(0,'Medic for team #' + InttoStr(Team) + ' is up for grabs. Type !medic to claim it.',Color); end;end;procedure OnMapChange(NewMap: string);var i: byte;begin for i := 1 to 2 do Medic[i] := 0; WriteConsole(0,'Medic is now up for grabs for both teams. Type !medic to claim it.',Color);end;procedure OnPlayerSpeak(ID: byte; Text: string);var Team: byte;begin if (Text = '!medic') then begin Team := GetPlayerStat(ID,'Team'); if Medic[Team] = 0 then begin Medic[Team] := ID; WriteConsole(ID,GetPlayerStat(ID,'Name') + ' has claimed medic for team #' + InttoStr(Team) + '.',Color); end else WriteConsole(ID,'Medic has already been claimed by ' + GetPlayerStat(Medic[Team],'Name') + '.',Color); end;end;
hi.i'm new here and i don't know rly, very much about scripts. i have arsse, and i converted this file to .pas, and recompiled it, but it still don't work ;/.If you know what i am doing wrong, please tell me.
I assume Dorkey allows other users to modify this script