Guest User

GVP.inc

a guest
Feb 1st, 2013
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.33 KB | None | 0 0
  1. /*
  2.     * GetVehiclePlate Include.
  3.         • Created by BullseyeHawk.
  4.         • Version 1.0
  5.         • Copyrighted by BullseyeHawk @ sa-mp.com (C) 2013.
  6.         • Enjoy, free license what so ever.
  7.    
  8.     Howto use - SetVehiclePlate:
  9.         ! After using CreateVehicle() or CreateVehicleEx()
  10.         ! Get vehicleid in anyway you'll want. I recommand using a define that equels to the CreateVehicle() or CreateVehicleEx() | Example: idgetter = CreateVehicle() / idgetter = CreateVehicleEx()
  11.         * Import SetVehiclePlate(vehicleid, "PLATE"); / SetVehiclePlate(idgetter, "PLATE");
  12.         * This should insert a string onto PlateText[vehicleid] / PlateText[idgetter] that can be getted trought GetVehiclePlate(vehicleid) / GetVehiclePlate(idgetter)
  13.    
  14.     Howto use - GetVehiclePlate:
  15.         ! Get vehicleid in anyway you'll want.
  16.         * Use GetVehiclePlate() with the define or anyway you want basicly.
  17.         * It should return the VehiclePlate text in a string. ((array))
  18. */
  19.  
  20. #include <a_samp>
  21.  
  22. new PlateText[MAX_VEHICLES][10];
  23.  
  24. forward SetVehiclePlate(vehicleid, platetext[]);
  25.  
  26. public SetVehiclePlate(vehicleid, platetext[])
  27. {
  28.     format(PlateText[vehicleid], 10, "%s", platetext);
  29.     return SetVehicleNumberPlate(vehicleid, platetext);
  30. }
  31.  
  32. stock GetVehiclePlate(vehicleid)
  33. {
  34.     return PlateText[vehicleid];
  35. }
  36.  
  37. native SetVehiclePlate(vehicleid, platetext[]);
  38. native GetVehiclePlate(vehicleid);
Advertisement
Add Comment
Please, Sign In to add comment