Vehicleid
#1

Hello i have this code:
pawn Код:
CMD:motor(playerid, params[])
{
    new alarm, doors, bonnet, boot, objective;
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        GameTextForPlayer(playerid, "PALJENJE MOTORA...", 3000, 3);
        SetTimerEx("Automobil", 3000, false, "i", playerid);
    }
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        if(GetVehicleParamsEx(vehicleid, 1, 1, alarm, doors, bonnet, boot, objective))
        {
            GameTextForPlayer(playerid, "GASENJE MOTORA...", 3000, 3);
            SetTimerEx("AutomobilDown", 3000, false, "i", playerid);
        }
    }
    return 1;
}
and this will start my engine and i added if(GetVehicleParamsEx(vehicleid, 1, 1, alarm, doors, bonnet, boot, objective)) that it checks is the player car on, but i have this:

pawn Код:
C:\Users\matRixgameR\Desktop\samp03x_svr_R2_win32\gamemodes\script.pwn(126) : error 017: undefined symbol "vehicleid"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
i was trying o put new vehicleid[MAX_VEHICLES]; then i get this:
pawn Код:
C:\Users\matRixgameR\Desktop\samp03x_svr_R2_win32\gamemodes\script.pwn(126) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
my timers if needed.
pawn Код:
forward Automobil(playerid);
public Automobil(playerid)
{
    new str[128];
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
    GameTextForPlayer(playerid, "USPESNO PALJENJE MOTORA", 3000, 3);
    format(str, sizeof(str), ""COL_PINK"* %s okrece kljuc i pali motor vozila.", getRoleplayName(playerid));
    SendClientMessage(playerid, 0xfffff, str);
    ProxDetector(20, playerid, str, COLOR_PINK);
    return 1;
}
forward AutomobilDown(playerid);
public AutomobilDown(playerid)
{
    new str[128];
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
    GameTextForPlayer(playerid, "USPESNO GASENJE MOTORA", 3000, 3);
    format(str, sizeof(str), ""COL_PINK"* %s okrece kljuc i gasi motor vozila.", getRoleplayName(playerid));
    SendClientMessage(playerid, 0xfffff, str);
    ProxDetector(20, playerid, str, COLOR_PINK);
    return 1;
}
Reply


Messages In This Thread
Vehicleid - by MatriXgaMer - 11.01.2014, 09:41
Re: Vehicleid - by Eth - 11.01.2014, 09:44
Re: Vehicleid - by Burridge - 11.01.2014, 09:45
Re: Vehicleid - by amirab - 11.01.2014, 09:45
Re: Vehicleid - by MatriXgaMer - 11.01.2014, 09:48
Re: Vehicleid - by Eth - 11.01.2014, 09:50
Re: Vehicleid - by MatriXgaMer - 11.01.2014, 09:52

Forum Jump:


Users browsing this thread: 6 Guest(s)