0 Members and 1 Guest are viewing this topic.
function OnCommand(ID: Byte; Text: string): boolean;beginvarini: TINIFile; if (GetPiece(Text, ' ',1) = '/editwep') then begin iniSetValue(ini, GetPiece (Text,' ',3), GetPiece (Text,' ',4), GetPiece (Text,' ',5)); iniSave(GetPiece (Text,' ',2), ini); // must call to save changes end; if (GetPiece(Text, ' ', 1) = '/dis') then begin SetWeaponActive(0, GetPiece(Text,' ', 2), false); end; if (GetPiece(Text, ' ', 1) = '/en') then begin SetWeaponActive(0, GetPiece(Text,' ', 2), true); end; if (GetPiece(Text, ' ', 1) = '/disID') then begin SetWeaponActive(GetPiece(Text,' ',2),GetPiece(Text,' ',3), false); end; if (GetPiece(Text, ' ', 1) = '/enID') then begin SetWeaponActive(GetPiece(Text,' ',2),GetPiece(Text,' ',3), true); end; Result := false; // Return true if you want to ignore the command typed.end;