0 Members and 1 Guest are viewing this topic.
'/weap': begin str:=Text; Delete(str,1,6); weapon:=255; if (Length(GetPiece(str,' ',0))<3) and (Is_Integer(GetPiece(str,' ',0))) then begin weapon:=strtoint(GetPiece(str,' ',0)); if (weapon<0) or (weapon>16) then begin WriteConsole(ID,'Weapon ID numbers can only range 0 to 16.',COLOR_WARNING); weapon:=254; end; end else for i:=0 to 16 do begin if MaskCheck(WeaponNameByNum(i),'*'+str+'*') then begin weapon:=i; break; end; end; if weapon < 254 then begin ForceWeapon(ID,weapon,GetPlayerStat(ID,'secondary'),255); WriteConsole(ID,'You'+#39+'ve been given the '+WeaponNameByNum(weapon)+'.',COLOR_PLAYERSETTING); end else if weapon = 255 then begin WriteConsole(ID,'Couldn'+#39+'t find any weapon whose name contains "'+str+'".',COLOR_WARNING); end; end;