Posts: 672
Threads: 89
Joined: Jan 2010
Hey!
This wont work...
pawn Code:
if (PRESSED(KEY_CROUCH))
{
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
}
I dont have any errors....which is the problem??:S
Thanks in advance!
Posts: 607
Threads: 41
Joined: Apr 2009
Quote:
Originally Posted by ColdXX
Hey!
This wont work...
pawn Code:
if (PRESSED(KEY_CROUCH)) { RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); }
I dont have any errors....which is the problem??:S
Thanks in advance!
|
Quote:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
// Check if the player is in any vehicle and is the driver
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if (newkeys & KEY_CROUCH)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),1000 .0);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
}
// Exit here
return 1;
}
}
// Exit here
return 1;
}
|
I guess it's same, Or maybe problem is in KEY_CROUCH that key never worked for me.. Try using other keys like KEY_SUBMISSION.