Vehicle ID bugging/problem
#6

ok I'll take pity on ya:

it's a pretty obvious problem but ur using the return from the setplate as the vehicle id which is just backwards and completely wrong.

here:
pawn Код:
GameTextForPlayer(playerid, "~g~VEHICLE SPAWNED!", 1500, 4);
    VehicleInfo[playerid][iVehicle][pv_vID] = CreateVehicle(VehicleInfo[playerid][iVehicle][pv_ModelID], VehicleInfo[playerid][iVehicle][pv_Pos][0], VehicleInfo[playerid][iVehicle][pv_Pos][1], VehicleInfo[playerid][iVehicle][pv_Pos][2], VehicleInfo[playerid][iVehicle][pv_Pos][3], VehicleInfo[playerid][iVehicle][pv_Colours][0], VehicleInfo[playerid][iVehicle][pv_Colours][1], -1);
    if(VehicleInfo[playerid][iVehicle][pv_Plate][0]) {
        SetVehicleNumberPlate(VehicleInfo[playerid][iVehicle][pv_vID], VehicleInfo[playerid][iVehicle][pv_Plate]);
    }
    if(!VehicleInfo[playerid][iVehicle][pv_Plate][0]) {
        SetVehicleNumberPlate(VehicleInfo[playerid][iVehicle][pv_vID], "SFRP");
    }
    SetVehicleHealth(VehicleInfo[playerid][iVehicle][pv_vID], VehicleInfo[playerid][iVehicle][pv_Health]);
    VehicleInfo[playerid][iVehicle][pv_Spawned] = 1;
    printf("Vehicle ID %d", VehicleInfo[playerid][iVehicle][pv_vID]);
ur just tryng to do too much in a single line and getting confused along the way. break it down and make it more visible and you'll find that you'll see these issues much clearer! The compiler doesn't care is you save lines or make extra ones so why compress everything into a mess lol?
Reply


Messages In This Thread
Vehicle ID bugging/problem - by MattSlater - 04.05.2013, 11:37
Re: Vehicle ID bugging/problem - by Pottus - 04.05.2013, 11:52
Re: Vehicle ID bugging/problem - by MattSlater - 04.05.2013, 11:54
Re: Vehicle ID bugging/problem - by MattSlater - 04.05.2013, 18:49
Re: Vehicle ID bugging/problem - by MattSlater - 06.05.2013, 00:10
Re: Vehicle ID bugging/problem - by CJay9209 - 06.05.2013, 07:05
Re: Vehicle ID bugging/problem - by MattSlater - 06.05.2013, 16:14

Forum Jump:


Users browsing this thread: 1 Guest(s)