SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Bug Reports

Reply
 
Thread Tools Display Modes
Old 01/08/2012, 11:12 PM   #1
Babul
High-roller
 
Babul's Avatar
 
Join Date: Sep 2009
Location: in a cement block
Posts: 1,925
Reputation: 251
Default player inside vehicle & frozen results in KEY_ACTION assigned like KEY_FIRE (as On Foot)

i just noticed a weird behavior when a player gets frozen in a vehicle:
pawn Code:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys){
    if (!(oldkeys & KEY_ACTION) && (newkeys & KEY_ACTION))
    {
        new Tick=GetTickCount();
        if(Tick-GetPVarInt(playerid,"LastMissileMS")<1000)
        {
            SetPVarInt(playerid,"LsstMissileMS",Tick+1000);
            TogglePlayerControllable(playerid,0);
            GameTextForPlayer(playerid,"dont spam",500,5);
        }
        else
        {
            SetPVarInt(playerid,"LastMissileMS",Tick);
            TogglePlayerControllable(playerid,1);
            GameTextForPlayer(playerid,"be careful",500,5);
        }
...i posted this snippet to let a player get frozen when he spams missiles...
the (frozen) player, set by TogglePlayerControllable(playerid,0) cannot set himself free by pressing the same key he used to get frozen. i checked out my on foot controls:
Code:
vehicle, fire = joy7 (flares wont affect, correct)
vehicle, sec.fire = joy1 (shooting missiles, then freeze, correct.)
on foot, fire = joy1 (punch, wont affect, correct)
on foot, action = joy7 (unfrozen, its warning/freezing as expected, on foot it works reverse (set free) aswell)
i dont know if i fucked up my config (doubt that), can anybody confirm that one single fire_key asigned wrongly when a player is frozen? thank you.
__________________
FireWorks

new sscanf2 custom specifiers available for Download, read the Release Topic
Babul is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pickup for vehicle and on foot MummyKillerSLO Help Archive 2 25/04/2010 10:01 AM
[SUGGESTION] Record both On Foot and in vehicle Memoryz Help Archive 6 07/09/2009 07:31 AM


All times are GMT. The time now is 02:50 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.