31.07.2016, 10:32
Can i somehow detect if player presses key R??
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))
{
if (IsPlayerInAnyVehicle(playerid))
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
}
return 1;
}
Its possible , use Sasino97 plugin : https://sampforum.blast.hk/showthread.php?tid=268671
|
This is a SERVER-ONLY key detection plugin. it detects only if the keys are pressed on the SERVER and not clients. This will NOT detect keypresses from people's games. |