Advertisement
OtaconEvil

[FUNCTION] Funciones 'Paintjob' By OTACON

Dec 13th, 2013
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.08 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 PaintjobVehicle[MAX_VEHICLES],bool:PaintjobActivated[MAX_VEHICLES];
  38. #define GetVehiclePaintjob(%0) PaintjobActivated[%0]
  39. #define GetVehiclePaintjobType(%0) PaintjobVehicle[%0]
  40. stock ChangeVehiclePaintjobEx(vehicleid, paintjobid){
  41. PaintjobVehicle[vehicleid] = paintjobid;
  42. PaintjobActivated[vehicleid] = true;
  43. return ChangeVehiclePaintjob(vehicleid, paintjobid); }
  44. #define ChangeVehiclePaintjob ChangeVehiclePaintjobEx
  45. #define RemoveVehiclePaintjob(%0) PaintjobActivated[%0]=false, ChangeVehiclePaintjob(%0, 3)
  46. /*
  47.     native ChangeVehiclePaintjob(vehicleid, paintjobid); //para colocar el paintjob al vehiculo correspondiente (es el del por defecto de SA-MP).
  48.     native RemoveVehiclePaintjob(vehicleid); //para remover el paintjob del vehiculo correspondiente.
  49.     native GetVehiclePaintjob(vehicleid); //para verificar si el vehiculo correspondiente tiene un paintjob colocado.
  50.     native GetVehiclePaintjobType(vehicleid); //para verificar el tipo de paintjob colocado en el vehiculo correspondiente.
  51. */
  52.  
  53. //TESTING...
  54. #include <a_samp>
  55. #include <zcmd> //http://forum.sa-mp.com/showthread.php?t=91354
  56. #include <sscanf2> //http://forum.sa-mp.com/showthread.php?t=120356
  57.  
  58. COMMAND:paintjobveh(playerid, params[]){
  59.     new vehicleid = GetPlayerVehicleID(playerid), data[128];
  60.     if(sscanf(params, "d", params[0])) return SendClientMessage(playerid, -1, "Escribe: /paintjobveh [paintjob]");
  61.     format(data,sizeof(data),"tipo de paintjob Anterior en Variable: [paintjob:%d] - paintjob modo[%b]", GetVehiclePaintjobType(vehicleid), GetVehiclePaintjob(vehicleid));
  62.     SendClientMessage(playerid,-1,data);
  63.     ChangeVehiclePaintjob(vehicleid, params[0]);
  64.     format(data,sizeof(data),"tipo de paintjob Colocado: [paintjob:%d] - tipo de paintjob guardado en Variable: [paintjob:%d] - paintjob activado[%b]",params[0], GetVehiclePaintjobType(vehicleid), GetVehiclePaintjob(vehicleid));
  65.     SendClientMessage(playerid,-1,data);
  66.     return true;
  67. }
  68. COMMAND:paintjobremove(playerid, params[]){
  69.     new vehicleid = GetPlayerVehicleID(playerid), data[128];
  70.     format(data,sizeof(data),"removiste el [paintjob:%d] al vehiculo [vehicleid:%d]",GetVehiclePaintjob(vehicleid), vehicleid);
  71.     SendClientMessage(playerid,-1,data);
  72.     RemoveVehiclePaintjob(vehicleid);
  73.     format(data,sizeof(data),"el vehiculo: [vehicleid:%d] tiene el paintjob: [paintjob:%d]",vehicleid, GetVehiclePaintjob(vehicleid));
  74.     SendClientMessage(playerid,-1,data);
  75.     return true;
  76. }
  77. COMMAND:paintjobactivated(playerid, params[]){
  78.     new vehicleid = GetPlayerVehicleID(playerid), data[128];
  79.     format(data,sizeof(data),"el vehiculo [vehicleid:%d] tiene el paintjob: [modo:%b]",vehicleid, GetVehiclePaintjobType(vehicleid));
  80.     SendClientMessage(playerid,-1,data);
  81.     return true;
  82. }
  83.  
  84. /*
  85.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  86.     *
  87.     * Estè Simple FUNCION esta hecho especialmente para www.forum.sa-mp.com
  88.     * NO Publicar estè FUNCION en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  89.     *
  90.     * Codigo Creado Por OTACON
  91.     *
  92.     * CREDITOS:
  93.     *     OTACON: Realizacion y Idea de creacion del code.
  94.     *     TÙ: Modificacion libremente respetando lo mencionado ;).
  95.     *
  96.     *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  97.     *
  98.     *            Prohibido TOTALMENTE el Robo de Créditos o la
  99.     *              Publicación de este FUNCION sin Mi Permiso.
  100. */
  101. /*
  102.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  103.     *
  104.     * This simple FUNCTION is made especially for www.forum.sa-mp.com
  105.     * DO NOT Post the FUNCTION in Other SAMP forums and impersonating the creator of the CODE.
  106.     *
  107.     * Code Created By OTACON
  108.     *
  109.     * CREDITS:
  110.     *     OTACON: Idea Making and code creation.
  111.     *     YOUR: Modification freely respecting the above ;).
  112.     *
  113.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  114.     *
  115.     *                    FULLY spaces Theft Credit or
  116.     *             Publication of this MAP without my permission.
  117. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement