21.02.2012, 19:21
hey can someone explain to me why this isnt working and maybe
give me a fix?
The first is working the carjump + flip
but the second one, suprise isn't.
Thanks
give me a fix?
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{ if((newkeys == KEY_SUBMISSION) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:va,Float:vx,Float:vy,Float:vz,vehid;
vehid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehid,vx,vy,vz);
SetVehiclePos(vehid,vx,vy,vz+10);
GetVehicleZAngle(GetPlayerVehicleID(playerid),va);
SetVehicleZAngle(GetPlayerVehicleID(playerid),va);
GameTextForPlayer(playerid,"~Y~Vehicle flipped",3000,5);
PlayerPlaySound(playerid,1137,0.0,0.0,0.0);
RepairVehicle(vehid);
}
if((newkeys == KEY_JUMP) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:X,Float:Y,Float:Z, vehid;
vehid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehid,X,Y,Z);
SetVehiclePos(vehid,Y,X,Z+60);
CreateExplosion(X, Y, Z, 8, 10.0);
GameTextForPlayer(playerid,"~G~ENJOY YOUR SUPRISE!~N~~N~~N~~W~SUPRISE:~W~ JUMP + BOOOOM!~n~Unlucky!",3000,5);
}
return 1;
}
but the second one, suprise isn't.
Thanks