Quote:
Originally Posted by ******
pawn Code:
// MUCH faster than "format" for copying strings. #define strcpy(%0,%1) \ strcat((%0[0] = '\0', %0), %1)
// So other scripts can't use this private variable. static stock PlateText[MAX_VEHICLES][10];
// No need for "public". stock SetVehiclePlate(vehicleid, platetext[]) { strcpy(PlateText[vehicleid], platetext); return SetVehicleNumberPlate(vehicleid, platetext); } // Rename "SetVehiclePlate" as "SetVehicleNumberPlate". #if defined _ALS_SetVehicleNumberPlate #undef SetVehicleNumberPlate #else #define _ALS_SetVehicleNumberPlate #endif #define SetVehicleNumberPlate SetVehiclePlate
// Could also use "GetVehicleNumberPlate" for consistency. stock GetVehiclePlate(vehicleid) { return PlateText[vehicleid]; }
// Should always be commented out like this. /* native SetVehiclePlate(vehicleid, platetext[]); native GetVehiclePlate(vehicleid); */
|
Thats awesome ******, I would have wanted to try by myself. but I never understood the true way of the _ALS_.
I wanted this from the start, this was originaly for my friend. I asked him for which version does he wants, the _ALS_ one or easy one, then I just released this as my first Include to try and mabye be better in the future.
Thanks ******, I'll try to improve my skills.