08.06.2011, 17:32
Hey guys. I am sad that i don't remember how this work......
I want to create my own vehicle engine but i don't know how.
I know that i need to use GetVehicleParamsEx and SetVehicleParamsEx but i don't know how to do it.
I only want to create that:
When player enter, it will toogle the engine off and player need to start it. I want the 0.3c engine system as the old ones just use the toggleplayercontrollable..... That freeze the player and not the car.
Thank you.
I have done this but i give me errors:
I want to create my own vehicle engine but i don't know how.
I know that i need to use GetVehicleParamsEx and SetVehicleParamsEx but i don't know how to do it.
I only want to create that:
When player enter, it will toogle the engine off and player need to start it. I want the 0.3c engine system as the old ones just use the toggleplayercontrollable..... That freeze the player and not the car.
Thank you.
I have done this but i give me errors:
pawn Код:
new engine;
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
GetVehicleParamsEx(vehicleid, engine);
SetVehicleParamsEx(vehicleid, engine, 0);
SendClientMessage(playerid, 0xFF00CC, "Use /ste to start the vehicle engine.");
return 1;
}
COMMAND:ste(playerid, param[])
{
SetVehicleParamsEx(vehicleid, engine, 1);
SendClientMessage(playerid, 0xFF00CC, "Engine Started. Use /spe to turn the vehicle engine off.");
return 1;
}
COMMAND:spe(playerid, param[])
{
SetVehicleParamsEx(vehicleid, engine, 0)
SendClientMessage(playerid, 0xFF00CC, "Engine Stoped. Use /ste to turn the vehicle engine on again.");
return 1;
}
Код:
C:\Users\Ricardo\Desktop\Script-Programaзгo\Script SA-MP\MyRP\MyRP\MyRP\gamemodes\myrp.pwn(2578) : error 017: undefined symbol "GetVehicleParamsEx" C:\Users\Ricardo\Desktop\Script-Programaзгo\Script SA-MP\MyRP\MyRP\MyRP\gamemodes\myrp.pwn(2579) : error 017: undefined symbol "SetVehicleParamsEx" C:\Users\Ricardo\Desktop\Script-Programaзгo\Script SA-MP\MyRP\MyRP\MyRP\gamemodes\myrp.pwn(2586) : error 017: undefined symbol "SetVehicleParamsEx" C:\Users\Ricardo\Desktop\Script-Programaзгo\Script SA-MP\MyRP\MyRP\MyRP\gamemodes\myrp.pwn(2592) : error 017: undefined symbol "SetVehicleParamsEx" C:\Users\Ricardo\Desktop\Script-Programaзгo\Script SA-MP\MyRP\MyRP\MyRP\gamemodes\myrp.pwn(2596) : warning 203: symbol is never used: "engine" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.