Norkezz Posted December 18, 2008 Author Share Posted December 18, 2008 I'm a really noob in scripting.But what i wont to ask is:I need to know how i can check whats in a slot.I have tried the function: GetPlayerWeaponSlot.I thought it whats the right one,but it calculates up how many times a item is picked up..So i need to know how i can check whats in my weapon slot.Does anyone knows the right code? Link to comment Share on other sites More sharing options...
franqetesh Posted December 18, 2008 Share Posted December 18, 2008 ???????????????????????????????????GetPlayerWeaponSlot It's the correct… It returns the number of the weapon item, not how many tims a item is picked up hahaha. Link to comment Share on other sites More sharing options...
Norkezz Posted December 18, 2008 Author Share Posted December 18, 2008 @franqetesh:> ???????????????????????????????????> > GetPlayerWeaponSlot It's the correct… It returns the number of the weapon item, not how many tims a item is picked up hahaha.But.It doesnt work by me.How i need to write it than if you know it good enough?I wont do it with IFLike this:If GetPlayerWeaponSlot(index) = 2 Then–----End IfBut thats doesnt work :sad: Link to comment Share on other sites More sharing options...
Norkezz Posted December 18, 2008 Author Share Posted December 18, 2008 It doesnt work :sad:I am really mad now.First the item number whas incorrect and now there is happen nothing :angry:Thats function just doesn't work!Wth is this :sad: Link to comment Share on other sites More sharing options...
DarkSpine Posted December 18, 2008 Share Posted December 18, 2008 Are you trying to do a command or something else?You didn't explain it very well…I might be able to help Link to comment Share on other sites More sharing options...
Norkezz Posted December 18, 2008 Author Share Posted December 18, 2008 @Spine:> Are you trying to do a command or something else?> You didn't explain it very well…> I might be able to helpI don't know exactly what you meaning.But i think a command.GetPlayerWeaponSlot.But thats doesnt work.It is not checking the item whats in the weapon slotIt is checking how many times the weapon is taken like pick it up or buy it.And now it is doing nothing:/ Link to comment Share on other sites More sharing options...
DarkMazer Posted December 19, 2008 Share Posted December 19, 2008 GetPlayerWeaponSlot returns the slot in your inventory that your equipped weapon is in. Try this:If GetPlayerInvItemNum(index, GetPlayerWeaponSlot(index)) = 2 Then…End IfThat'll give you the item number of the player's weapon. Link to comment Share on other sites More sharing options...
balliztik1 Posted December 19, 2008 Share Posted December 19, 2008 If GetPlayerWeaponSlot(index) <> 0 ThenIf GetPlayerInvItemNum(index, GetPlayerWeaponSlot(index)) = 2 ThenEnd IfEnd IfThe script will bug out if you just use GetPlayerWeaponSlot and it returns a null value (unless that's been fixed…) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now