Author Topic: Changing Crosshairs  (Read 3173 times)

I know that crosshairs are client sided, but is it possible to change the crosshair.png thingy via script if the other crosshair(s) is/are already downloaded?


Crosshair.setBitmap(string Filename) - Set the bitmap displayed in the control. Note that it is limited in size to 256x256.

Doesn't get much simpler than that :cookieMonster:

Crosshair.setBitmap(string Filename) - Set the bitmap displayed in the control. Note that it is limited in size to 256x256.

Doesn't get much simpler than that :cookieMonster:

I tried "crosshair.setBitmap(.\base\client\ui\crosshair2.png)" and "crosshair.setBitmap(D:\Blockland\base\client\ui\crosshair2.png)" and neither one worked.

Yes.

I have the script.

Okay Mr. Genuis, mind sharing?

crosshair.setBitmap("./base/client/ui/crosshair2.png");

crosshair.setBitmap("./base/client/ui/crosshair2.png");

It should be:

Code: [Select]
crosshair.setBitmap("base/client/ui/crosshair2.png");
The "./" at the beginning would look for a "base" folder in the same folder as the script running this command.

Code: [Select]
crosshair.setBitmap("base/client/ui/crosshair2.png");

Kick ass! It works!

Now that I have that down, is it possible to apply it to a weapon?

You should note that the command (when used on a server) will only change your crosshair. In order for it to change for everyone you need them all to a have a client.cs script with that code in it.

is it possible to apply it to a weapon?
More Halo stuff to go with your Valhalla map? :cookieMonster:

special cursor action when locked on target? :3

I don't need to change everyone's crosshair. I was just wondering if I could have certian weapons change the client's crosshair, and when the crosshair specific weapons are not in use, the default crosshair returns.

I thought it would be neat to have a sniper crosshair for the sniper only, and things like that.

special cursor action when locked on target? :3

That wasn't my original idea, but that would be nice.

More Halo stuff to go with your Valhalla map? :cookieMonster:

Kinda. I'm going to try to make some weapons that use certain firing tactics that I'm fairly sure Blockland has never seen before.



Does anyone know if there's an ammo mod or something like that, and if so, send me a link. Thanks.

Does anyone know if there's an ammo mod or something like that, and if so, send me a link. Thanks.
There is one included in Gamemode_Zombie of course...
But not a seperate one.
In case you want to use the one in Rotondo's zombiemode:
It depends if they overwrite the onfire method or not.

If they don't it's as simple as adding this:

$zombie::ammo::Gun[$zombie::ammo::Listcount++] = YourWeaponProjectile;
$zombie::ammo::AmmoYourWeaponProjectile = 60;

if they do overwrite the onfire method you'll have to add this:

AmmoSYSFire(%this,%obj,%slot);

To the onfire method, but even then it's not going to be fully supported, e.g. when you run out of ammo instead of hearing a clicking noise, it'll just get removed from your inventory.
Try looking at SolarFlare's Revolver script, he made it work well with the Zombies ammo and clicking sound.

I'll see if I can snatch the one from the Zombie Mod.

Is that on RTB?

I'll see if I can snatch the one from the Zombie Mod.

Is that on RTB?
The ammo mod is included in the zombie mod (Rotondo's) that is on RTB.

The ammo mod is included in the zombie mod (Rotondo's) that is on RTB.

Okay, thanks, I'll go look for it.