How to makes that player can't shot
#1

Player Can't Shot
їHow can I make, that a player can't shot his weapon?.

I had been trying with "ClearAnimations", "TogglePlayerControllable". But not works.
Any have an idea of how can I make it?

Thanks for your attention.
Reply
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE))
    {
        new x, y, z;
                GetPlayerPos(playerid, x, y, z);
                SetPlayerPos(playerid, x, y, z+1);
                //or try this: ResetPlayerWeapons(playerid);
    }
    return 1;
}
not sure if that would work but give it a try !
or just simply dont give them a weapon ._.??: ResetPlayerWeapons(playeridid);
Reply
#3

Quote:
Originally Posted by Voxel
Посмотреть сообщение
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE))
    {
        new x, y, z;
                GetPlayerPos(playerid, x, y, z);
                SetPlayerPos(playerid, x, y, z+1);
                //or try this: ResetPlayerWeapons(playerid);
    }
    return 1;
}
not sure if that would work but give it a try !
or just simply dont give them a weapon ._.??: ResetPlayerWeapons(playeridid);
Tested, but doesn't works
It's worst than ever, when you hit too many times the KEY_FIRE doesn't shot, but when you release the button, then you can shot normal.

The shot is just cancelled when you hit constantly, if you just hit the KEY 1 time, or at ending of the pressing the key, it fires

Thanks , anyway.
Reply
#4

Check if KEY_FIRE is being pressed or held and set as armed weapon the fist. This may work.

So instead of getting and setting the position, use:
pawn Код:
SetPlayerArmedWeapon( playerid, 0 );
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)