Posts: 78
Threads: 25
Joined: Sep 2007
Reputation:
0
Hi!
At a spawn players get baseball bats, but I made a command that should remove the baseball bat, but it doesn't.
Se here is what I tried:
SetPlayerAmmo(playerid, 1, 0);
GivePlayerWeapon(playerid, 5, -1);
But the bat is still here :/
How can I remove it?
Next thing that I can think of is saving all weapons and ResetPlayerWeapons(playerid); but I don't want to do it, really.
Posts: 388
Threads: 11
Joined: Feb 2008
Reputation:
0
Change the AddPlayerClass(...);, so it doesn't give the weapon.
Posts: 78
Threads: 25
Joined: Sep 2007
Reputation:
0
No good, there are other weapons like theese and those shouldn't be removed from spawn.
Posts: 78
Threads: 25
Joined: Sep 2007
Reputation:
0
Ok, will try to explain more, if you don't get this.
I said I can't simply remove the bat because there are other weapons like that, that means there are weapons which aren't given to the spawn.
For some reasons theese 2 functions with that amount of ammo doesn't work, so maybe there is a trick that could remove them?
Not sure, but could be a weapon that goes in the WeaponSlot 1 which has bullets, that way I could set it's ammo to 0 zero and the weapon will disappear, but that doesn't happen to weapons that doesn't have bullets.
Posts: 78
Threads: 25
Joined: Sep 2007
Reputation:
0
Thanks, but bit too late.
I got p*ssed off because of the baseball bat thing not working that I made a weapon saving system and then gave the weapons back after ResetPlayerWeapons(playerid);
I found out that Baseball bats has 65535 bullets.
So now there is no baseball bat :P
But thanks for the reply, others might need such a weapon saving script, could save weapons in a file or mysql (like I do).