Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Need help (timer/drawsprite)


dragonxboy
 Share

Recommended Posts

hello everyone, I have been trying to write a simple code for a mount system. [3.0]

what I did was, I use the 'drawsprite' sub  and have it so when my equipment type mount is worn it changes your sprite to the mounted sprite.

and I am using the attack timer to load the players sprite back to normal it he is not mounted ..

I have it working correctly except now I am trying to make it work with male and females.. and I have all my paperdolling set up and working… paperdoll while riding them ount for male and female and regular paperdolls..

MY ONLY PROBLOM IS:

If GetPlayerSex(Index) = 0 wont function right….. (it is working correctly for rendering paperdolls for male and female and I do have it set up server and client correctly)

this is the code im using

[client]

after

```

    ' Check to see if we want to stop making him attack
   With Player(Index)
        If .AttackTimer + attackspeed < GetTickCount Then
            .Attacking = 0
            .AttackTimer = 0
            End If
        End With
```

I have 

```

         With Player(Index)

          If .AttackTimer + attackspeed < GetTickCount Then

         'Call GetPlayerSex(Index)

        If GetPlayerEquipment(Index, mount) <= 0 Then

          If GetPlayerSex(Index) = 0 Then

        Call SetPlayerSprite(Index, Item(18).Sprite)
     ' .AttackTimer = 0
       'End If
     ' End If

       'End If
        ElseIf GetPlayerSex(Index) = 1 Then
       '  Call GetPlayerSex(Index)
          'If .AttackTimer + attackspeed < GetTickCount Then

       ' If GetPlayerEquipment(Index, mount) <= 0 Then
      ' If GetPlayerSex(Index) = 0 Then
        Call SetPlayerSprite(Index, Item(18).paperdoll2)
     .AttackTimer = 0
    End If
      End If
     ' End If
       ' End If
       End If
End With
```
im sorry that its so sloppy but you can see I have been trying to rearrange stuff to make it work but whats happening is

now when I try to set up my timer to draw the players sprite back to normal if they are not mounted the  

```
if getplayersex(index) = 0
```
at the top changes my sprite to female whether im male or female and if I change it to 1 it will change character to male even if there female…. ughhh  weird thing is 0 is supposed ot be male and 1 is supposed to be female..  is it not loading the player sex correctly ? it works for rendering my paperdolls..?!!!?!!?! :(

if someone can help me get my timer working I will post my mount system

(the paperdoll2 isn't actually paperdoll it should have been named sprite2, but its set up correctly im just using an item to save my sprites that get drawn.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...