0 Members and 1 Guest are viewing this topic.
//Script help to Mich//By Squiddy ~//Thanks to HackTank for MaintainWeapons();Const Color = $FEDEBA; //Color to be used. Var Classe: Array[1..32] of String; Procedure MaintainWeapons(ID, WepNum: Byte); Var Wep: Byte; Begin Wep := GetPlayerStat(ID,'Primary'); if Wep <> WepNum Then ForceWeapon(ID,WepNum,GetPlayerStat(ID,'Secondary'),0);end;Procedure OnPlayerKill(Killer, Victim: Byte; Weapon: String); Begin if Classe[Killer] = 'Mechanic' Then Begin GiveBonus(Killer,5); end;end;Procedure OnPlayerRespawn(ID: Byte); Begin if Classe[ID] = 'Mechanic' Then MaintainWeapons(ID, 11); if Classe[ID] = 'Assassins' Then MaintainWeapons(ID, 14);end;Procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte); Begin if Classe[ID] = 'Mechanic' Then MaintainWeapons(ID, 11); if Classe[ID] = 'Assassins' Then MaintainWeapons(ID, 14);end;Procedure OnPlayerSpeak(ID: Byte; Text: String); Begin if LowerCase(Text) = '!mechanic' Then if Classe[ID] = 'None' Then Begin Classe[ID] := 'Mechanic'; WriteConsole(ID,'You are now a mechanic!',Color); end; if LowerCase(Text) = '!assassins' Then if Classe[ID] = 'None' Then Begin Classe[ID] := 'Assassins'; WriteConsole(ID,'You are now an Assassin!',Color); end;end;Procedure AppOnIdle(Ticks: Integer); Var S: Byte; Begin For S := 1 To 32 Do if GetPlayerStat(S,'Active') = True Then Begin if Classe[S] = 'Mechanic' Then Begin MaintainWeapons(S,11); end; if Classe[S] = 'Assassins' Then Begin if Ticks Mod (60 * 15) = 0 Then Begin GiveBonus(S,1); end if Ticks Mod 60 = 0 Then Begin MaintainWeapons(S,14); end; end; end;end;Procedure OnJoinGame(ID, Team: Byte); Begin Classe[ID] := 'None';end;
Your script work but ...1-when i do !mechanic i cant change my classe for !assassins2-when i do !assassins i cant change my classe for !mechanic
3-can you include the swompie script with yours to make a big one ?
4-i can be all the other classe at the same time i am a !assassins or a !mechanic
[...]That is why I switched to tabs instead of 2 spaces, as I have been doing before.
Tabs ftw...
http://edn.embarcadero.com/article/10280#4.3It's officially recommended to use two spaces. If not for that, do it because it's easier to read (I don't think Pascal's verboseness works well with tabs, to be honest).