23.04.2010, 14:29
How make that the weapon will disappear when you take it out....
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;
}
Originally Posted by _❼_
pawn Код:
|
public OnPlayerUpdate(playerid)
{
//if(GetPlayerWeapon(playerid) != 0)
{
SetPlayerArmedWeapon(playerid,0); // fists
return 0; // no syncing until they change their weapon
}
return 1;
}
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 Код:
![]() |
Originally Posted by _❼_
Go learn PAWN before you use dangerous Irony like that.
|
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. |
Originally Posted by _❼_
Have you tested this?! Go test it, then come back and stfu crying like a Grade A internet troll.
|
Originally Posted by _❼_
Go learn PAWN before you use dangerous Irony like that.
|