01.08.2012, 23:12
i just noticed a weird behavior when a player gets frozen in a vehicle:
...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:
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.
pawn Код:
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);
}
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:
Код:
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)