SA-MP Forums Archive
VehicleID - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: VehicleID (/showthread.php?tid=336299)



VehicleID - sjvt - 21.04.2012

Yo, im busy with a Vehicle System but i have now some problems..
In the morning it works perfect but now not.. The problem is the VehicleID

In the morning i had this
Код:
[11:43:50] >> mysql_query( Connection handle: 1 )

[11:43:50] CMySQLHandler::Query(UPDATE `server_vehicles` SET `VehicleOwner`='For Sale', `VehiclePurchased`='0' WHERE `VehicleID` = '1') - Successfully executed.

[12:01:22] >> mysql_query( Connection handle: 1 )

[12:01:22] CMySQLHandler::Query(UPDATE `server_vehicles` SET `VehicleOwner`='For Sale', `VehiclePurchased`='0' WHERE `VehicleID` = '2') - Successfully executed.
But now i got this..

Код:
[23:18:37] >> mysql_query( Connection handle: 1 )

[23:18:37] CMySQLHandler::Query(UPDATE `server_vehicles` SET `VehicleOwner`='For Sale', `VehiclePurchased`='0' WHERE `VehicleID` = '44') - Successfully executed.

[23:18:46] >> mysql_query( Connection handle: 1 )

[23:18:46] CMySQLHandler::Query(UPDATE `server_vehicles` SET `VehicleOwner`='For Sale', `VehiclePurchased`='0' WHERE `VehicleID` = '43') - Successfully executed.
To get/check the VehicleID i use
pawn Код:
new vehicleidx = GetPlayerVehicleID(playerid);



Re: VehicleID - sjvt - 21.04.2012

Please

i did try this

pawn Код:
//This
new vehicleidx = GetPlayerVehicleID(playerid);

//To
new vehicleidx = GetVehicleID(GetPlayerVehicleID(playerid));

// And then stock
GetVehicleID(vehicleid) {
    new id;
    for(new x = 1; x < MAX_VEHICLES; x++) {
        if(VehicleInfo[x][VehID] == vehicleid)
        {
            id = x;
            break;
        }
    }
    return id;
}
But now he said VehicleID 0

Код:
00:31:11] >> mysql_query( Connection handle: 1 )

[00:31:11] CMySQLHandler::Query(UPDATE `server_vehicles` SET `VehicleOwner`='For Sale', `VehiclePurchased`='0' WHERE `VehicleID` = '0') - Successfully executed.



Re: VehicleID - MP2 - 22.04.2012

Wait what?

GetVehicleID(vehicleid)?

Do you realise how stupid that sounds?


Re: VehicleID - sjvt - 22.04.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
Wait what?

GetVehicleID(vehicleid)?

Do you realise how stupid that sounds?
Who cares? Do you realise how stupid your name is..


Re: VehicleID - sjvt - 23.04.2012

Nobody?