GetPlayerKeys while frozen
#15

nop, I'm outside of a vehicle... sec I'll post my code...

the command that freezes the player also sets sgtPlayerVehicle[playerid] = 0
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(sgtPlayerVehicle[playerid] != -1)
    {
        if((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK))
        {
            TextDrawHideForPlayer(playerid, Info);
            TextDrawHideForPlayer(playerid, Name[playerid]);
            DestroyVehicle(sgtVehicle[playerid]);
            sgtVehicle[playerid] = -1;
            sgtPlayerVehicle[playerid] = -1;
            TogglePlayerControllable(playerid, 1);
            SetCameraBehindPlayer(playerid);
        }
        else if((newkeys & KEY_ACTION) && !(oldkeys & KEY_ACTION))
        {
            TextDrawHideForPlayer(playerid, Info);
            TextDrawHideForPlayer(playerid, Name[playerid]);
            sgtVehicle[playerid] = -1;
            sgtPlayerVehicle[playerid] = -1;
            TogglePlayerControllable(playerid, 1);
            SetCameraBehindPlayer(playerid);
        }
    }
    return 1;
}
Reply


Messages In This Thread
GetPlayerKeys while frozen - by Sascha - 04.05.2011, 10:26
Re: GetPlayerKeys while frozen - by Sascha - 04.05.2011, 21:18
Re: GetPlayerKeys while frozen - by Cameltoe - 04.05.2011, 21:21
Re: GetPlayerKeys while frozen - by Sascha - 04.05.2011, 21:23
Re: GetPlayerKeys while frozen - by Cameltoe - 04.05.2011, 21:29
Re: GetPlayerKeys while frozen - by Sascha - 04.05.2011, 21:30
Re: GetPlayerKeys while frozen - by armyoftwo - 05.05.2011, 05:35
Re: GetPlayerKeys while frozen - by Cameltoe - 05.05.2011, 07:25
Re: GetPlayerKeys while frozen - by BigETI - 05.05.2011, 11:20
Re: GetPlayerKeys while frozen - by Sascha - 05.05.2011, 13:44
Re: GetPlayerKeys while frozen - by MadeMan - 05.05.2011, 13:58
Re: GetPlayerKeys while frozen - by Sascha - 05.05.2011, 14:10
Re: GetPlayerKeys while frozen - by MadeMan - 05.05.2011, 14:12
Re: GetPlayerKeys while frozen - by armyoftwo - 05.05.2011, 14:14
Re: GetPlayerKeys while frozen - by Sascha - 05.05.2011, 15:14

Forum Jump:


Users browsing this thread: 4 Guest(s)