[HELP]Make gun disappear
#1

How make that the weapon will disappear when you take it out....
Reply
#2

pawn Код:
public OnPlayerUpdate(playerid)
{
    //if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) { // Uncomment this to use just in interiors.
      SetPlayerArmedWeapon(playerid,0); // fists
      return 0; // no syncing until they change their weapon
    //} // and this
    return 1;
}
Otherwise, just leave it as that.
Reply
#3

But its just set hand but gun exist....
Reply
#4

Quote:
Originally Posted by _❼_
pawn Код:
public OnPlayerUpdate(playerid)
{
    //if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) { // Uncomment this to use just in interiors.
      SetPlayerArmedWeapon(playerid,0); // fists
      return 0; // no syncing until they change their weapon
    //} // and this
    return 1;
}
Otherwise, just leave it as that.
With that code you will get an error and nobody is every synced.
Reply
#5

Lol no you won't, it's straight out of my GM.

It sets the armed weapon to fists when the weapon is took out, since OnPlayerUpdate is called every 1000ms or w/e it is it works fine, go test it.

Unless you mean because I commented out the interior thing, anybody with a brain would know that you need the weapon check. Do it like this:

pawn Код:
public OnPlayerUpdate(playerid)
{
    //if(GetPlayerWeapon(playerid) != 0)
     {
      SetPlayerArmedWeapon(playerid,0); // fists
      return 0; // no syncing until they change their weapon
     }
    return 1;
}
Ok, now go test.
Reply
#6

Quote:
Originally Posted by _❼_
Lol no you won't, it's straight out of my GM.

It sets the armed weapon to fists when the weapon is took out, since OnPlayerUpdate is called every 1000ms or w/e it is it works fine, go test it.

Unless you mean because I commented out the interior thing, anybody with a brain would know that you need the weapon check. Do it like this:

pawn Код:
public OnPlayerUpdate(playerid)
{
    //if(GetPlayerWeapon(playerid) != 0)
     {
      SetPlayerArmedWeapon(playerid,0); // fists
      return 0; // no syncing until they change their weapon
     }
    return 1;
}
Ok, now go test.
you are returning 0, tard
Reply
#7

Go learn PAWN before you use dangerous Irony like that.
Reply
#8

Quote:
Originally Posted by _❼_
Go learn PAWN before you use dangerous Irony like that.
Are you a complete retard?

Quote:
Originally Posted by [url]https://sampwiki.blast.hk/wiki/OnPlayerUpdate
[/url]
Returns 0 - Update from this player will not be replicated to other clients.
Returns 1 - Indicates that this update can be processed normally and sent to other players.
Time for you to go and read some scripting tutorials, Also learn the meaning of the word 'Irony' while your at it.
Reply
#9

Have you tested this?! Go test it, then come back and stfu crying like a Grade A internet troll.
Reply
#10

Quote:
Originally Posted by _❼_
Have you tested this?! Go test it, then come back and stfu crying like a Grade A internet troll.
You seriously are retarded, Try testing it with more than one person and watch what happens dipshit.
Reply
#11

Disgard
Reply
#12

I totally failed. I don't understand how I couldn't of seen that... it's been in there for fucking months.

Ahh well -

Troll: 1
Me: 0

gg.
Reply
#13

Hmm but how do that it dont take gun what admin give ?
Reply
#14

Quote:
Originally Posted by _❼_
Go learn PAWN before you use dangerous Irony like that.
you should learn pawno not all functions are the same so are not the GM's buddy between stop insulting people
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)