Szerző Téma: GetVehicleNumberPlate  (Megtekintve 881 alkalommal)

dexi

  • Vendég
GetVehicleNumberPlate
« Dátum: 2012. augusztus 05. - 13:19:48 »
+3 Show voters
Készítõ: Fl0rian
Elkészítési idõtartam: 10 perc
 GetVehicleNumberPlate( vehicleid, tostring[], size = sizeof(tostring) );
 
// =============================================================================================
#if defined FL0RiAN_CREDIT$                                                   // =
                                                               // =                                                                     // =
=============================================================                          // =
=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=                          // =
=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=                          // =
=~~~~|*****************|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=                          // =
=~~~~|*****************|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=                          // =
=~~~~|*****************|~~|**|~~~|**********|~~~~~~~~~~~~~~~=                          // =
=~~~~|***|~~~~~~~~~~~~~~~~|**|~~~|**********|~~~~~~~~~~~~~~~=                          // =
=~~~~|***********|~~~~~~~~|**|~~~|**|~~~~|**|~~~~~~~~~~~~~~~=                          // =
=~~~~|***********|~~~~~~~~|**|~~~|**|~~~~|**|~~~~~~~~~~~~~~~=                          // =
=~~~~|***********|~~~~~~~~|**|~~~|**|~~~~|**|~~~~~~~~~~~~~~~=                          // =
=~~~~|***|~~~~~~~~~~~~~~~~|**|~~~|**|~~~~|**|~~~~~~~~~~~~~~~=                          // =
=~~~~|***|~~~~~~~~~~~~~~~~|**|~~~|**********|~~~~~~~~.~~~~~~=                          // =
=~~~~|***|~~~~~~~~~~~~~~~~|**|~~~|**********|~~~~~~~/~\\~~~~~=                          // =
=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<~2012>~~~=                          // =
=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\~/~~~~~=                          // =
=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~¢~~~~~~=                          // =
=============================================================                          // =
                                                                                            // =
#endif                                                                  // =
// =============================================================================================
//              |\'\'\'\'\'\'\'\'\'|
//              |\'\'\'\'\'\'\'\'\'|
//              |\'\'\'\'\'\'\'\'\'|                                         @ GetVehicleNumberPlate( vehicleid, tostring[] );
//              |\'\'\'\'\'\'\'\'\'|                                             - vehicleid = Az adott jármû azonosítója.
//              |\'\'\'\'\'\'\'\'\'|                                             - tostring[] = A string amibe mentse a lekért rendszámot.
//              |\'\'\'\'\'\'\'\'\'|                                                   
//              |\'\'\'\'\'\'\'\'\'|
//           ----|\'\'\'\'\'\'\'\'\'|----
//          \\\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'/
//           \\\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'/
//            \\\'\'\'\'\'\'\'\'\'\'\'\'\'/
//             \\\'\'\'\'\'\'\'\'\'\'\'/
//              \\\'\'\'\'\'\'\'\'\'/
//               \\\'\'\'\'\'\'\'/
//                \\\'\'\'\'\'/
//                 \\\'\'\'/
//                  \\\'/
//                   ·
 
#include < a_samp >
new v_Plate[ MAX_VEHICLES ][ 32 + 1 ];
stock Flo_CreateVehicle( vehicletype, Float: x, Float: y, Float: z, Float: rotation, color1, color2, respawn_delay ) {
new vID = CreateVehicle( vehicletype, x, y, z, rotation, color1, color2, respawn_delay );
Flo_SetVehicleNumberPlate( vID, (\"XYZR 000\") );
return vID;
}
#define CreateVehicle Flo_CreateVehicle
stock Flo_AddStaticVehicle( modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2 ) {
new vID = AddStaticVehicle( modelid, spawn_x, spawn_y, spawn_z, angle, color1, color2 );
Flo_SetVehicleNumberPlate( vID, (\"XYZR 000\") );
return vID;
}
#define AddStaticVehicle Flo_AddStaticVehicle
stock Flo_AddStaticVehicleEx( modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay ) {
new vID = AddStaticVehicleEx( modelid, spawn_x, spawn_y, spawn_z, angle, color1, color2, respawn_delay );
Flo_SetVehicleNumberPlate( vID, (\"XYZR 000\") );
return vID;
}
#define AddStaticVehicleEx Flo_AddStaticVehicleEx
stock Flo_SetVehicleNumberPlate( vehicleid, numberplate[] ) {
strdel( v_Plate[vehicleid], 0, strlen(v_Plate[vehicleid]) );
strins( v_Plate[vehicleid], numberplate, 0, (32) );
return SetVehicleNumberPlate( vehicleid, numberplate );
}
#define SetVehicleNumberPlate Flo_SetVehicleNumberPlate
stock GetVehicleNumberPlate( vehicleid, tostring[], size = sizeof(tostring) ) {
if( InvalidVehicle(vehicleid) ) { format( tostring, size, \"UNKNOWN\" ); }
else {
format( tostring, size, \"%s\", v_Plate[vehicleid] );
}
return 1;
}
stock InvalidVehicle( vehicleid ) {
if( GetVehicleModel(vehicleid) == 0 ) return true;
return false;
}

 
// Elcsúnyult a credits-em : (

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal