Quote:
Originally Posted by Sunehildeep
I guess you should making something like this.
PHP код:
new Plates[MAX_VEHICLES][30];
SetVehicleNumberPlateEx(vehicleid, plate[])
{
SetVehicleNumberPlateEx(vehicleid, plate);
format(Plates[vehicleid],30,plate);
return 1;
}
Usage: SetVehicleNumberPlateEx(vehicleid, "ABCD 123");
GetIDFromPlate(plate[])
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(!strcmp(Plates[i],plate)) return i;
}
return -1;
}
Usage: GetIDFromPlate("ABCD 123");
And save the Plates variable too.
|
Awesome! Just wanna ask if
PHP код:
SetVehicleNumberPlateEx(vehicleid, plate[])
{
SetVehicleNumberPlateEx(vehicleid, plate);//shouldn't this be SetVehicleNumberPlate?
format(Plates[vehicleid],30,plate);
return 1;
}