Vehicle Engine Help.
#1

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:

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.
Reply
#2

Wow, I got:

Код:
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(336) : error 021: symbol already defined: "OnPlayerEnterVehicle"
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(337) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(337) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(337) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(337) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(337) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(337) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(338) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(338) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(338) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(338) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(338) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(345) : error 017: undefined symbol "vehicleid"
C:\Users\User\Desktop\First Class Roleplay\gamemodes\fcrp.pwn(351) : error 017: undefined symbol "vehicleid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#3

Hey there, here is a tutorial that could help you a LOT, "Click me"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)