How To Start Engine With Key N - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How To Start Engine With Key N (
/showthread.php?tid=614377)
How To Start Engine With Key N -
DhanZ - 07.08.2016
How To Start Engine With Key N
This Is Command:
if(strcmp(cmd, "/engine", true)
Re: How To Start Engine With Key N -
Flake. - 07.08.2016
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
that should help you, there are some examples further down the page.
Re: How To Start Engine With Key N -
Luicy. - 07.08.2016
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
if((newkeys & KEY_NO) && !(oldkeys & KEY_NO)) {
if (IsPlayerInAnyVehicle(playerid)) {
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid), !engine, lights, alarm, doors, bonnet, boot, objective);
}
}
return 1;
}
Next time, don't post something like this. You made a request, this should've been a reply to;
https://sampforum.blast.hk/showthread.php?tid=447813