Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <natives.h>
- #include <common.h>
- #include <consts.h>
- #define true 1
- #define false 0
- int veh = 0;
- unsigned int Model = 0;
- char *vehname;
- // YOU WILL HAVE TO ADD IN YOUR OWN ARGUMENTS TO SETUP THE DRAWS!!!!!!!!!!!!!!!
- void setupdraw(int r,int g,int b){
- SET_TEXT_FONT(); //Set font
- SET_TEXT_SCALE(,); //Set text size
- SET_TEXT_COLOUR(r,g,b,255);// Set text r,g,b when function is called & alpha is 255
- SET_TEXT_DROPSHADOW(false,0,0,0,255);// Set text shadow
- }
- void Displayer(void){
- if(IS_CHAR_IN_ANY_CAR(GetPlayerPed())){//If you're in a car
- GET_CAR_CHAR_IS_USING(GetPlayerPed(),&veh);// Get car you're using and store handle in veh
- GET_CAR_MODEL(veh,&Model); //Get the model hash from veh and store it in Model
- vehname = GET_DISPLAY_NAME_FROM_VEHICLE_MODEL(Model); //Get vehicle name from hash stored in Model
- }
- else{ //Else you have no car
- vehname = "You have no vehicle"; //Draw You have no vehicle
- Model = 0; //Model hash = 0
- }
- setupdraw(,,); //Set the R,G,B for the text
- SET_TEXT_EDGE(true,,,,); //Give the text a neon outline
- DISPLAY_TEXT_WITH_LITERAL_STRING(,,"string",vehname); //Vehicle Model Name
- setupdraw(,,); //Set the R,G,B for the text
- SET_TEXT_EDGE(true,,,,); //Give the text a neon outline
- DISPLAY_TEXT_WITH_NUMBER(+(GET_STRING_WIDTH_WITH_STRING("STRING",vehname)+0.012),,"NUMBER",Model);
- //Display model name then display the hash after the model name, +0.012 = spacing between Model name and hash
- }
- void main(void){
- THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
- print("Created by ADRENALINE IX",4000);
- while(true){
- WAIT(0);
- Displayer();
- }
- }
- // YOU WILL HAVE TO ADD IN YOUR OWN ARGUMENTS TO SETUP THE DRAWS!!!!!!!!!!!!!!!
Advertisement
Add Comment
Please, Sign In to add comment