0 Members and 1 Guest are viewing this topic.
procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: byte); begin if (GetPlayerStat(ID,'Active') = true) then begin if (GetPlayerStat(ID,'Team') = 2) then begin if (GetPlayerStat(ID,'Alive') = true) then begin if (PrimaryNum <> 255) then // if wep was in primary slot if (PrimaryNum <> 15) then SpawnObject(GetPlayerStat(ID, 'x'),GetPlayerStat(ID, 'y')-32,PrimaryNum); if (SecondaryNum <> 255) then // if wep was in secondary slot if (SecondaryNum <> 15) then SpawnObject(GetPlayerStat(ID, 'x'),GetPlayerStat(ID, 'y')-32,SecondaryNum); ForceWeapon(ID, 255, 255, 0); end; end; end;end;
Procedure AppOnIdle(Ticks: Integer);var ID: Byte; begin for ID := 1 to 32 do begin if GetPlayerStat(ID,'Primary') <> 255 then ForceWeapon(ID,255,255,0); if GetPlayerStat(ID,'Secondary') <> 255 then ForceWeapon(ID,255,255,0); end; end;
Procedure AppOnIdle(Ticks: Integer);var ID,Weapon1,Weapon2,X,Y: Byte; begin for ID := 1 to 32 do begin Weapon1 := GetPlayerStat(ID,'Primary'); Weapon2 := GetPlayerStat(ID,'Secondary'); GetPlayerXY(ID,X,Y); if Weapon1 <> 255 then begin ForceWeapon(ID,255,255,0); if Weapon1 <> 15 then SpawnObject(X,Y-32,Weapon1); end; if Weapon2 <> 255 then begin ForceWeapon(ID,255,255,0); if Weapon2 <> 15 then SpawnObject(X,Y-32,Weapon2); end; end; end;
I just said that they are really not necessary and make your script less effective.
Also, anyone tried spawning an object with ID 0 or 255?