#1

Could someone possibly see if they could make this work?

pawn Код:
else if (listitem == 1)
{
    SendClientMessage(playerid, COLOR_GREEN, "SUCCESS: You have locked your Vehicle");
    SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),playerid,0,1);
}
It does not lock the vehicle.
Reply
#2

pawn Код:
#define VEHICLE_PARAMS_UNSET    -1
#define VEHICLE_PARAMS_OFF  0
#define VEHICLE_PARAMS_ON   1

native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
native GetVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective);
Reply
#3

Why don't you use 0.3c Functions?
Is better
Reply
#4

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
pawn Код:
#define VEHICLE_PARAMS_UNSET    -1
#define VEHICLE_PARAMS_OFF  0
#define VEHICLE_PARAMS_ON   1

native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
native GetVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective);
He is using SetVehicleParamsForPlayer
Reply
#5

Quote:
Originally Posted by SkizzoTrick
Посмотреть сообщение
Why don't you use 0.3c Functions?
Is better
Because he's using 0.3b and he's not ready for 0.3c.
Reply
#6

I am not bother what I use xD, Just as long as it fixes, I will try it now.

Also I am using 0.3c and I tbh forgot about the new features .
Reply
#7

Quote:
Originally Posted by SkizzoTrick
Посмотреть сообщение
He is using SetVehicleParamsForPlayer
Yes.. That's how it would be used for 0.3c
Reply
#8

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
pawn Код:
#define VEHICLE_PARAMS_UNSET    -1
#define VEHICLE_PARAMS_OFF  0
#define VEHICLE_PARAMS_ON   1

native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
native GetVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective);
It is for some reason saying it is already defined even though I search through my Script and found none..

EDIT: Found out why..
Reply
#9

Bump but Here is my full code for the Vehicle System.

pawn Код:
if (dialogid == 50)
    {
        SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "SUCCESS: License Plate has been changed");
        TogglePlayerControllable(playerid, true);
    }
    new engine,lights,alarm,doors,bonnet,boot,objective;
    if (dialogid == 51)
    {
        if (listitem == 0)
        {
            ShowPlayerDialog(playerid, 10, DIALOG_STYLE_INPUT, "{CC3300}Changing your License Plate", "Input your desired License Plate below", "Done", "Back");
        }
        else if (listitem == 1)
        {
            SendClientMessage(playerid, COLOR_GREEN, "SUCCESS: You have locked your Vehicle");
            new vid = GetPlayerVehicleID(playerid);
            if(vid != INVALID_VEHICLE_ID)
            {
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
            }
        }
        else if (listitem == 2)
        {
            SendClientMessage(playerid, COLOR_GREEN, "SUCCESS: You have unlocked your Vehicle");
            new vid = GetPlayerVehicleID(playerid);
            if(vid != INVALID_VEHICLE_ID)
            {
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
            }
        }
        else if (listitem == 3)
        {
            SendClientMessage(playerid, COLOR_GREEN, "SUCCESS: You have turned off your Vehicle's engine");
            new vid = GetPlayerVehicleID(playerid);
            if(vid != INVALID_VEHICLE_ID)
            {
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
            }
        }
        else if (listitem == 4)
        {
            SendClientMessage(playerid, COLOR_GREEN, "SUCCESS: You have turned on your Vehicle's engine");
            new vid = GetPlayerVehicleID(playerid);
            if(vid != INVALID_VEHICLE_ID)
            {
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
            }
        }
    }
    if (dialogid == 10)
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
        SetVehicleToRespawn(GetPlayerVehicleID(playerid));
        SendClientMessage(playerid, COLOR_RED, "SUCCESS: You have set your Vehicles License Plate");
        TogglePlayerControllable(playerid, true);
    }
    TogglePlayerControllable(playerid, true);
    return 0;
}
Is it correct?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)