You are viewing our Forum Archives. To view or take place in current topics click here.

Do you like

Yes
100.00% (1 vote)
Maybe
0.00% (0 votes)

Total Votes: 1

{RELEASE}Gta iv Sources Codes
Posted:

{RELEASE}Gta iv Sources CodesPosted:

nickstar24
  • New Member
Status: Offline
Joined: Sep 14, 201113Year Member
Posts: 32
Reputation Power: 1
Status: Offline
Joined: Sep 14, 201113Year Member
Posts: 32
Reputation Power: 1
here are some of my Gta iv Source codes i use in my menus That Might help you

my hate list code
/*
Maker: NickStar24
*/

#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
//locals
bool checkNow;
uint room_total=0;


#define nuber_of_tags 5 // change this to the LAST NUMBER of troll_list[NUMBER] then add 1 eg: 4(total) + 1 = 5
char *hate_list[nuber_of_tags]; // Leave this here.
void trollList(void){
   // Add names to list in " " ... eg: "GamerTag1" to "Players Gt"
   troll_list[0] = "XF UNKNOWN";
   troll_list[1] = "unknown modzz";
   troll_list[2] = "GamerTag3";
   troll_list[3] = "GamerTag4";
   troll_list[4] = "GamerTag5";
   
}

void print(char *string1){
   PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", string1, 5000, 1);
}

void doSearch(void){
   trollList();
   room_total = GET_NUMBER_OF_PLAYERS();
   int Tags , i , playerCount=16 ;
   for(Tags = 0; Tags < nuber_of_tags; Tags++){
      for (i=0; i <= playerCount; i++) {   
         if (IS_NETWORK_PLAYER_ACTIVE(i)){
            if(COMPARE_STRING(GET_PLAYER_NAME(CONVERT_INT_TO_PLAYERINDEX(i)), hate_list[Tags])){
               if(GET_PLAYER_ID() == GET_HOST_ID()){
                  NETWORK_KICK_PLAYER(CONVERT_INT_TO_PLAYERINDEX(i) , true);
                  print(hate_list[Tags]);
                  WAIT(1000);
                  print("~g~was ~r~kicked");
                  WAIT(1000);
               }
               else {
                  print(hate_list[Tags]);
                  WAIT(1000);
                  print("~g~....is in the room , ~r~starting new free mode game");
                  WAIT(1000);
                  SHUTDOWN_AND_LAUNCH_NETWORK_GAME(2); // free mode
               }
            }
         }
      }
      if( i = playerCount){
         checkNow = false;
      }
   }
   
}

void main(void){
   THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
   checkNow = true;
   while(true){
      WAIT(0);
      if(IS_NETWORK_SESSION()){
         if(checkNow) doSearch();
         else{
            if(room_total != GET_NUMBER_OF_PLAYERS()){
               checkNow = true;
               PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", "~g~New player or someone left , ~r~Starting a New search", 2500, 1);
            }
         }
      }
      else TERMINATE_THIS_SCRIPT();
   }
}


my speedo source
#include <natives.h>
#include <common.h>
#include <consts.h>
#include <types.h>
#include <strings.h>


void NickStar24TextAndInt(float x1, float y1, int red1, int green1, int blue1, int num, float x2, float y2, int red2, int green2, int blue2)
{
// TEXT
SET_TEXT_FONT(1); // TEXTFONT_LED
SET_TEXT_BACKGROUND(0);
SET_TEXT_SCALE(0.88, 1.08);
SET_TEXT_COLOUR(red1, green1, blue1, 255);
SET_TEXT_EDGE(1, 0, 0, 0, 0);
SET_TEXT_RIGHT_JUSTIFY(0);
SET_TEXT_DROPSHADOW(0, 255, 255, 255, 255);
DISPLAY_TEXT_WITH_LITERAL_STRING(x1, y1, "STRING", "MPH");

// NUM
SET_TEXT_FONT(1); // TEXTFONT_LED
SET_TEXT_BACKGROUND(0);
SET_TEXT_SCALE(1.76, 2.16);
SET_TEXT_COLOUR(red2, green2, blue2, 255);
SET_TEXT_EDGE(1, 0, 0, 0, 0);
SET_TEXT_RIGHT_JUSTIFY(0);
SET_TEXT_DROPSHADOW(0, 255, 255, 255, 255);
DISPLAY_TEXT_WITH_NUMBER(x2, y2, "NUMBER", num);
}

void funnycar(void)
{
Car veh_speed;
float fSpeed;
int iSpeed;
bool rep_speed = 0;
if (IS_CHAR_IN_ANY_CAR(GetPlayerPed())) { rep_speed = 1; }
 else { rep_speed = 0; }

 if (rep_speed == 1) // LOOP start
 {
  if (!IS_CHAR_IN_ANY_CAR(GetPlayerPed()))
  {
   rep_speed = 0; // LOOP end
  }
  GET_CAR_CHAR_IS_USING(GetPlayerPed(), &veh_speed);
  GET_CAR_SPEED(veh_speed, &fSpeed);
  fSpeed = fSpeed * 2.94; // Speed multiplier
  iSpeed = (int) fSpeed; // float to int
  Nickstar24TextAndInt(0.4, 0.865, 0, 255, 0, iSpeed, 0.17, 0.8, 255, 0, 0);
 }
}


void main(void){         
THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
   while(true)
   {
funnycar();
WAIT(0);

}

drunk cam
}
   if(item_selected == 11){
      Cam cam;
         GET_ROOT_CAM(&cam);
         SET_DRUNK_CAM(cam, 1.0, 10000);
      return;

model freeze protection
          for(j = 0; j<16; j++){
if(!IS_NETWORK_PLAYER_ACTIVE(j)) continue;
if(j == GET_PLAYER_ID()) continue;
GET_PLAYER_CHAR(j, &online_char);
if(!DOES_CHAR_EXIST(online_char)) continue;
               GET_CHAR_MODEL(online_char,&model);
               if(model == MODEL_PLAYER){
                  GET_CHAR_COORDINATES(online_char,&mx,&my,&mz);
               GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(GetPlayerPed(), 0, 0, 0, &x,&y,&z);
               GET_DISTANCE_BETWEEN_COORDS_3D(mx,my,mz,x,y,z, &dist);
               if(dist <= 30){
                  if(GET_HOST_ID() == GET_PLAYER_ID()){
                  NETWORK_KICK_PLAYER(j,true);
                  print("Player Kicked For Trying to Freeze You with Model Changer");
                  }
                  else{
               SET_CHAR_COORDINATES(GetPlayerPed(),x+50,y+50,z+10);
               }
                  }
               }
         }

group freeze protection
Group Bgroup;
         GET_PLAYER_GROUP(GET_PLAYER_ID(), &Bgroup);
           if(DOES_GROUP_EXIST(Bgroup)){
            if(!IS_GROUP_LEADER(GetPlayerPed(), Bgroup)){
               REMOVE_CHAR_FROM_GROUP(GetPlayerPed());
               REMOVE_GROUP(Bgroup);
               REMOVE_CHAR_FROM_GROUP(GetPlayerPed());
               print("Somebody tried to ~r~FREEZE ~w~you with Group Glitch");
            }
         }

freeze gun protection
int ped;
            if (PLAYER_HAS_CHAR(GET_PLAYER_ID())){
         GET_PLAYER_CHAR(GET_PLAYER_ID(), &ped);
            if (HAS_CHAR_GOT_WEAPON(ped, WEAPON_ROCKET)){
            REMOVE_WEAPON_FROM_CHAR(ped, WEAPON_ROCKET);
         print("Somebody tried to ~r~FREEZE ~w~you with Freeze Gun");
            }
         }

super punch
if(superpunch){
   int wep;
   GET_CURRENT_CHAR_WEAPON(GetPlayerPed(),&wep);
if(wep == WEAPON_UNARMED){
   if(IS_BUTTON_PRESSED(0,BUTTON_B)){
      WAIT(700);
      GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(GetPlayerPed(), 0, 0, 0, &x, &y, &z);
      ADD_EXPLOSION(x, y+2, z, EXPLOSION_SHIP_DESTROY, 10, 0, 1, 0);
   }
}

tazer punch
if(superpunch){
   int wep;
   GET_CURRENT_CHAR_WEAPON(GetPlayerPed(),&wep);
if(wep == WEAPON_UNARMED){
   if(IS_BUTTON_PRESSED(0,BUTTON_B)){
      WAIT(700);
      GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(GetPlayerPed(), 0, 0, 0, &x, &y, &z);
      ADD_EXPLOSION(x, y+2, z, EXPLOSION_DIR_WATER_HYDRANT, 10, 0, 1, 0);
   }
}

give online player neons
for(i = 0;i <= player_loop;i++){
                           if(is_whitelisted(i)) continue;
                     if(DOES_CHAR_EXIST(players[i].ped)){
                           if(IS_CHAR_IN_ANY_CAR(players[i].ped)){
                              tick=0;
                              GET_CAR_CHAR_IS_USING(players[i].ped,&cveh);
                              GET_NETWORK_ID_FROM_VEHICLE(cveh,&nvid);
                              if(network_control(nvid)){
                           CREATE_OBJECT(0x2F8AEA79,0,0,0,&lights,1);
          WAIT(1);
         ATTACH_OBJECT_TO_CAR(lights,cveh,0,0,0.2,-0.2,-190,0,160.20);
         SET_OBJECT_LIGHTS(lights, true);
         SET_OBJECT_VISIBLE(lights, true);
         SET_OBJECT_INVINCIBLE(lights, 1);
         CREATE_OBJECT(0x2F8AEA79,0,0,0,&lights,1);
         WAIT(1);
         ATTACH_OBJECT_TO_CAR(lights,cveh,0,0,0.2,-0.2,-190,0,160.20);
         SET_OBJECT_LIGHTS(lights, true);
         SET_OBJECT_VISIBLE(lights, true);
         SET_OBJECT_INVINCIBLE(lights, 1);
         CREATE_OBJECT(0x2F8AEA79,0,0,0,&lights,1);
         WAIT(1);
         ATTACH_OBJECT_TO_CAR(lights,cveh,0.0f,0,0.2,-0.2,-190,0,160.2);
         SET_OBJECT_LIGHTS(lights, true);
         SET_OBJECT_VISIBLE(lights, true);
         SET_OBJECT_INVINCIBLE(lights, 1);
         CREATE_OBJECT(0x2F8AEA79,0,0,0,&lights,1);
         WAIT(1);
         ATTACH_OBJECT_TO_CAR(lights,cveh,0.0f,0.2,-1.0,-0.2,-190,0,160.2);
         SET_OBJECT_LIGHTS(lights, true);
         SET_OBJECT_VISIBLE(lights, true);
         SET_OBJECT_INVINCIBLE(lights, 1);
         CREATE_OBJECT(0x2F8AEA79,0,0,0,&lights,1);
         WAIT(1);
         ATTACH_OBJECT_TO_CAR(lights,cveh,0.0f,0.2,1.2,-0.2,-190,0,160.2);
         SET_OBJECT_LIGHTS(lights, true);
         SET_OBJECT_VISIBLE(lights, true);
         SET_OBJECT_INVINCIBLE(lights, 1);
         CREATE_OBJECT(0x2F8AEA79,0,0,0,&lights,1);         
         WAIT(1);
         ATTACH_OBJECT_TO_CAR(lights,cveh,0,0,0.2,-0.2,-190,0,160.20);
         SET_OBJECT_LIGHTS(lights, true);
         SET_OBJECT_VISIBLE(lights, true);
         SET_OBJECT_INVINCIBLE(lights, 1);
                           }
                     }
                     }
                     }
                           print("Orange Neons Given to Player");

give/take online players car god mode
for(i = 0;i <= player_loop;i++){
         if(is_whitelisted(i)) continue;
         if(DOES_CHAR_EXIST(players[i].ped)){
            if(IS_CHAR_IN_ANY_CAR(players[i].ped)){
               GET_CAR_CHAR_IS_USING(players[i].ped,&cveh);
               GET_NETWORK_ID_FROM_VEHICLE(cveh,&nveh);
               if(network_control(nveh)){
               SET_CAR_CAN_BE_DAMAGED(cveh,false);
               SET_CAR_CAN_BE_VISIBLY_DAMAGED(cveh,false);
               SET_CAN_BURST_CAR_TYRES(cveh,false);
               }
            }
         }
      }
      print("Given all Players Vehicle Helper");
   }
   if(item_selected == 3){
      for(i = 0;i <= player_loop;i++){
         if(is_whitelisted(i)) continue;
         if(DOES_CHAR_EXIST(players[i].ped)){
            if(IS_CHAR_IN_ANY_CAR(players[i].ped)){
               GET_CAR_CHAR_IS_USING(players[i].ped,&cveh);
               GET_NETWORK_ID_FROM_VEHICLE(cveh,&nveh);
               if(network_control(nveh)){
               SET_CAR_CAN_BE_DAMAGED(cveh,true);
               SET_CAR_CAN_BE_VISIBLY_DAMAGED(cveh,true);
               SET_CAN_BURST_CAR_TYRES(cveh,true);
               }
            }
         }
      }
      print("Taken all Players Vehicle Helper");

put object on online players
for(i = 0;i <= player_loop;i++){
         if(is_whitelisted(i)) continue;
         if(DOES_CHAR_EXIST(players[i].ped)){
         REQUEST_MODEL(0xB4A4DCCF);
         while(!HAS_MODEL_LOADED(0xB4A4DCCF)) WAIT(0);
         Object otmp;
         CREATE_OBJECT(0xB4A4DCCF,0.0,0.0,0.0,&otmp,true);
         ATTACH_OBJECT_TO_PED(otmp,players[i].ped,0,0.0,0.0,-0.11,0.0,0.0,3.0,false);
         WAIT(10);
         MARK_OBJECT_AS_NO_LONGER_NEEDED(&otmp);
         print("Attached Bill Board to Player");
         }
      }
   }

Animations
Kiss
REQUEST_ANIMS("amb@dating");
      while(!HAVE_ANIMS_LOADED("amb@dating")) WAIT(0);
      TASK_PLAY_ANIM_WITH_FLAGS(pPlayer,"girl_hug","amb@dating",8.0,0,0);//****
      return;

Stripper
REQUEST_ANIMS("MISSSTRIPCLUBHI");
      while(!HAVE_ANIMS_LOADED("MISSSTRIPCLUBHI")) WAIT(0);
      TASK_PLAY_ANIM_WITH_FLAGS(pPlayer,"Lap_Triangle_A3_Woman","MISSSTRIPCLUBHI",8.0,0,0);
      return;

busted
REQUEST_ANIMS("busted");
      while(!HAVE_ANIMS_LOADED("busted")) WAIT(0);   
      TASK_PLAY_ANIM_WITH_FLAGS(GetPlayerPed(),"idle_2_hands_up","busted",8.0,0,0x20);
      return;

heli spot light
if(item_select == 13){
Vehicle pveh;
if((IS_CHAR_IN_ANY_CAR)(pPlayer)){
GET_CAR_CHAR_IS_USING(pPlayer,&pveh);
if(IS_CHAR_IN_ANY_HELI(pPlayer)){
int Object, object1;
CREATE_OBJECT(0x2D593870, 0, 0, 0, &object1, 1);
ATTACH_OBJECT_TO_CAR(object1, pveh, 1.604, -0.2065, 2.524, -0.2668,0 ,0, 0);
SET_OBJECT_LIGHTS(object1, true);
SET_OBJECT_VISIBLE(object1, true);
SET_OBJECT_INVINCIBLE(object1, 1);
CREATE_OBJECT(0x2D593870, 0, 0, 0, &object1, 1);
WAIT(1);
ATTACH_OBJECT_TO_CAR(object1, pveh, 1.604, -0.2065, 2.524, -0.2668,0 ,0, 0);
SET_OBJECT_LIGHTS(object1, true);
SET_OBJECT_VISIBLE(object1, true);
SET_OBJECT_INVINCIBLE(object1, 1);
CREATE_OBJECT(0x2D593870, 0, 0, 0, &object1, 1);
WAIT(1);
ATTACH_OBJECT_TO_CAR(object1, pveh, 1.604, -0.2065, 2.524, -0.2668,0 ,0, 0);
SET_OBJECT_LIGHTS(object1, true);
SET_OBJECT_VISIBLE(object1, true);
SET_OBJECT_INVINCIBLE(object1, 1);
CREATE_OBJECT(0x2D593870, 0, 0, 0, &object1, 1);
WAIT(1);
ATTACH_OBJECT_TO_CAR(object1, pveh, 1.604, -0.2065, 2.524, -0.2668,0 ,0, 0);
SET_OBJECT_LIGHTS(object1, true);
SET_OBJECT_VISIBLE(object1, true);
SET_OBJECT_INVINCIBLE(object1, 1);
CREATE_OBJECT(0x2D593870, 0, 0, 0, &object1, 1);
WAIT(1);
ATTACH_OBJECT_TO_CAR(object1, pveh, 1.604, -0.2065, 2.524, -0.2668,0 ,0, 0);
SET_OBJECT_LIGHTS(object1, true);
SET_OBJECT_VISIBLE(object1, true);
SET_OBJECT_INVINCIBLE(object1, 1);
Print ("Helicopter Spotlight On");
}
else{
Print("GET TO THE CHOPPA");
}
 
}
return;
}

i will add more later on i hope these help

The following 1 user thanked nickstar24 for this useful post:

SKSMODMENU (07-20-2013)
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.