Advertisement
OtaconEvil

[FUNCTION] Guardar/Verificar Colores del Vehiculo By OTACON

Dec 12th, 2013
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.90 KB | None | 0 0
  1. /*
  2.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  3.     *
  4.     * Estè Simple FUNCION esta hecho especialmente para www.forum.sa-mp.com
  5.     * NO Publicar estè FUNCION en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  6.     *
  7.     * Codigo Creado Por OTACON
  8.     *
  9.     * CREDITOS:
  10.     *     OTACON: Realizacion y Idea de creacion del code.
  11.     *     TÙ: Modificacion libremente respetando lo mencionado ;).
  12.     *
  13.     *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  14.     *
  15.     *            Prohibido TOTALMENTE el Robo de Créditos o la
  16.     *              Publicación de este FUNCION sin Mi Permiso.
  17. */
  18. /*
  19.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  20.     *
  21.     * This simple FUNCTION is made especially for www.forum.sa-mp.com
  22.     * DO NOT Post the FUNCTION in Other SAMP forums and impersonating the creator of the CODE.
  23.     *
  24.     * Code Created By OTACON
  25.     *
  26.     * CREDITS:
  27.     *     OTACON: Idea Making and code creation.
  28.     *     YOUR: Modification freely respecting the above ;).
  29.     *
  30.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  31.     *
  32.     *                    FULLY spaces Theft Credit or
  33.     *             Publication of this MAP without my permission.
  34. */
  35.  
  36. //FUNCTION...
  37. new ColorVehicle[2][MAX_VEHICLES];
  38. #define GetVehicleColor1(%0) ColorVehicle[0][%0]
  39. #define GetVehicleColor2(%0) ColorVehicle[1][%0]
  40. stock ChangeVehicleColorEx(vehicleid, color1, color2){
  41. ColorVehicle[0][vehicleid] = color1;
  42. ColorVehicle[1][vehicleid] = color2;
  43. return ChangeVehicleColor(vehicleid, color1, color2); }
  44. #define ChangeVehicleColor ChangeVehicleColorEx
  45. /*
  46.     native ChangeVehicleColor(vehicleid, color1, color2); //el del por defecto de SA-MP
  47.     native GetVehicleColor1(vehicleid); //para verificar e guardar el color 1 que tiene el vehiculo
  48.     native GetVehicleColor2(vehicleid); //para verificar e guardar el color 2 que tiene el vehiculo
  49. */
  50.  
  51. //TESTING...
  52. #include <a_samp>
  53. #include <zcmd> //http://forum.sa-mp.com/showthread.php?t=91354
  54. #include <sscanf2> //http://forum.sa-mp.com/showthread.php?t=120356
  55.  
  56. COMMAND:colorveh(playerid, params[]){
  57.     new vehicleid = GetPlayerVehicleID(playerid), data[128];
  58.     if(sscanf(params, "dd", params[0], params[1])) return SendClientMessage(playerid, -1, "Escribe: /colorveh [color1] [color2]");
  59.     format(data,sizeof(data),"Color Anterior en Variable: [color1:%d - color2:%d]",GetVehicleColor1(vehicleid),GetVehicleColor2(vehicleid));
  60.     SendClientMessage(playerid,-1,data);
  61.     ChangeVehicleColor(vehicleid, params[0], params[1]);
  62.     format(data,sizeof(data),"Color Colocado: [color1:%d - color2:%d] - Color guardado en Variable: [color1:%d - color2:%d]",params[0], params[1], GetVehicleColor1(vehicleid),GetVehicleColor2(vehicleid));
  63.     SendClientMessage(playerid,-1,data);
  64.     return true;
  65. }
  66.  
  67. /*
  68.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  69.     *
  70.     * Estè Simple FUNCION esta hecho especialmente para www.forum.sa-mp.com
  71.     * NO Publicar estè FUNCION en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  72.     *
  73.     * Codigo Creado Por OTACON
  74.     *
  75.     * CREDITOS:
  76.     *     OTACON: Realizacion y Idea de creacion del code.
  77.     *     TÙ: Modificacion libremente respetando lo mencionado ;).
  78.     *
  79.     *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  80.     *
  81.     *            Prohibido TOTALMENTE el Robo de Créditos o la
  82.     *              Publicación de este FUNCION sin Mi Permiso.
  83. */
  84. /*
  85.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  86.     *
  87.     * This simple FUNCTION is made especially for www.forum.sa-mp.com
  88.     * DO NOT Post the FUNCTION in Other SAMP forums and impersonating the creator of the CODE.
  89.     *
  90.     * Code Created By OTACON
  91.     *
  92.     * CREDITS:
  93.     *     OTACON: Idea Making and code creation.
  94.     *     YOUR: Modification freely respecting the above ;).
  95.     *
  96.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  97.     *
  98.     *                    FULLY spaces Theft Credit or
  99.     *             Publication of this MAP without my permission.
  100. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement