What's new

Solved Freeze Car Protection Source

  • Thread starter XEX MODLOADER
  • Start date
  • Views 1,223
XEX MODLOADER

XEX MODLOADER

Banned
Messages
13
Reaction score
0
Points
35
Sin$
0
Would this code work for a Freeze Car Protection?


C:
#include <natives.h>
#include <common.h>

uint freeze_model;
Vehicle freeze_veh;

if(freeze_model != MODEL_ANNIHILATOR || freeze_model != MODEL_MAVERICK || freeze_model != MODEL_POLMAV || freeze_model != MODEL_TOURMAV)
IS_THIS_MODEL_A_CAR(model) && IS_CHAR_IN_ANY_HELI(online)

void main(void)
{
    while(true)
    {
        if(IS_CHAR_IN_ANY_CAR(GetPlayerPed()))
        {
            GET_CAR_CHAR_IS_USING(GetPlayerPed(), &freeze_veh);
            GET_CAR_MODEL(freeze_veh, &freeze_model);
            if(IS_THIS_MODEL_A_HELI(freeze_model))
            {
         
            DELETE_CAR(&freeze_veh);
            DELETE_CAR(&freeze_model);            
            printlong("All Freeze Cars Deleted");
            WAIT(50);
            printlong("Made by: Majestic");
            }
        }
        WAIT(0);
    }
}
 
DUBST3PMODZ

DUBST3PMODZ

Enthusiast
Messages
142
Reaction score
62
Points
115
Sin$
-7
your code is not protection car freeze.

this "DELETE_CAR(&Freeze_model); " your freeze anywhere

This native only accepts Vehicle veh no uint model
 
Last edited:
Upvote 0
DUBST3PMODZ

DUBST3PMODZ

Enthusiast
Messages
142
Reaction score
62
Points
115
Sin$
-7
C:
#include <natives.h>
#include <consts.h>
#include <types.h>
#include <common.h>

uint freeze_model;
Vehicle freeze_veh;

bool DetectHeliFreeze(uint model){
   
    if(model == MODEL_ANNIHILATOR) return true;
    else if(model == MODEL_MAVERICK) return true;
    else if(model == MODEL_POLMAV) return true;
    else if(model == MODEL_TOURMAV) return true;
    return false;
}

void Function (void){
    if(IS_CHAR_IN_ANY_HELI(GetPlayerPed()))
    {
        GET_CAR_CHAR_IS_USING(GetPlayerPed(), &freeze_veh);
        GET_CAR_MODEL(freeze_veh, &freeze_model);
       
        if(DetectHeliFreeze(freeze_model))
        {
            DELETE_CAR(&freeze_veh);
            print("All Freeze Cars Deleted");
            WAIT(500);
            print("Made by: Majestic");
            return;
        }
    }
}

void main(void)
{
    print("Freeze Car Protection Enable");
    while(true)
    {
        WAIT(0);
        Function();
    }
}
 
Upvote 0
Top Bottom
Login
Register