IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Post mod/code requests in the Mod Requests topic

Post mod releases in the Mod Showroom

Read the Modding Rules BEFORE posting!

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (2) [1] 2   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Identify Current/Last Vehicle Entered

 
Billsy93  
Posted: Tuesday, May 21 2013, 15:26
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 7, 2013

XXXXX



Hello,

Basically I am trying to create a script (in C++) whereby the player can easily identify the last car they were in upon exiting the vehicle (running off to do something else). The last vehicle entered will have an arrow above it and will appear as a blip on your map and minimap and will be called "Your Car". If you then go on to enter another vehicle, the previous vehicle will be forgotten and the new vehicle will be classed as your new, current vehicle that you are making use of.

I have made quite a start and I'm nearly there, however I'm stuck and seek some help, the main problems are that my compiler (Visual Studio) doesn't like the GetDriverOfCar function and its' parameters as well as the fact I'm unsure as to how to get the vehicle ID of my current car in order to add a blip to it so it can be identified once i've exited the vehicle regarding the AddBlipToCar function.

Below is the code I have thus far, any help would be appreciated to get this up and running:

CODE
#include "CustomFiberThread.h"
#include "Scripting.h"
#include "../ScriptHook/Log.h"
#include <windows.h>

using namespace Scripting;

CustomFiberThread::CustomFiberThread()
{
SetName("CarOwnership");
}

void CustomFiberThread::RunScript()
{
while(IsThreadAlive())
{
Blip SavedVehicleBlip;
int playerIndex = ConvertIntToPlayerIndex(GetPlayerId());
Ped ped;
GetPlayerChar(playerIndex, &ped);
Blip SavedVehicleBlip;
Vehicle LastVehicle;
Vehicle SavedVehicle;
Vehicle CurrentVehicle;
   
if ((IsCharInAnyCar(GetPlayerPed()) == true) && (GetDriverOfCar(CurrentVehicle, &GetPlayerPed()) == ped))
{
if (SavedVehicle != false)
{
SetCarAsMissionCar(SavedVehicle, false);
SavedVehicleBlip == false;
}
GetCarCharIsUsing(ped, &CurrentVehicle);
StoreCarCharIsInNoSave(playerIndex, &CurrentVehicle);
SetCarAsMissionCar(CurrentVehicle, true);
AddBlipForCar(GetVehicleModel(), &SavedVehicleBlip);
ChangeBlipSprite(SavedVehicleBlip, BLIP_GARAGE);
ChangeBlipScale(SavedVehicleBlip, 0.5f);
ChangeBlipColour(SavedVehicleBlip, 5); //Magenta
SetBlipAsShortRange(SavedVehicleBlip, 1);
ChangeBlipNameFromAscii(SavedVehicleBlip, "Your Car");
}
       
if (SavedVehicle != false)
{
SetCarAsMissionCar(CurrentVehicle, false);;
RemoveBlip(SavedVehicleBlip);
}
 
if ((IsCharInAnyCar(GetPlayerPed()) == true))
{
LastVehicle = CurrentVehicle;
}
}
}


Cheers,

Billsy
PM
  Top
 

 
jitsuin666  
Posted: Tuesday, May 21 2013, 16:03
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 21, 2013

XXXXX



Ped vehicle and blip are scripthookdotnet classes. For the native with errors check scripting.h and u can see how to use
PM
  Top
 

 
Billsy93  
Posted: Tuesday, May 21 2013, 16:09
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 7, 2013

XXXXX



QUOTE (jitsuin666 @ Tuesday, May 21 2013, 16:03)
Ped vehicle and blip are scripthookdotnet classes. For the native with errors check scripting.h and u can see how to use

Yes, I did check scripting.h as some of the native functions I have used had to be added across from scriptingdirty.h but I'm still unsure as to where to go from the code I have and how to go about rectifying the few errors that still remain.

Thanks.
PM
  Top
 

 
jitsuin666  
Posted: Tuesday, May 21 2013, 16:15
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 21, 2013

XXXXX



Post the method from the header file
PM
  Top
 

 
Billsy93  
Posted: Tuesday, May 21 2013, 16:20
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 7, 2013

XXXXX



QUOTE (jitsuin666 @ Tuesday, May 21 2013, 16:15)
Post the method from the header file

What do you mean by this, can you elaborate, do you want me to post some extra information here?

Thanks.
PM
  Top
 

 
Lord_of_Light  
Posted: Tuesday, May 21 2013, 21:00
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 21, 2013

XXXXX



yes i wanted u to post this code:

CODE
static void GetDriverOfCar(Vehicle vehicle, Ped *pPed) { NativeInvoke::Invoke<NATIVE_GET_DRIVER_OF_CAR, ScriptVoid>(vehicle, pPed); }


i recommend u write this in c#, c++ scripts dont have any performance benefits really and coding it is more a hassle for someone new...

c#

CODE
Ped driver = vehicle.GetPedOnSeat(VehicleSeat.Driver);//will crash if vehicle does not exist


c++

CODE
Vehicle vehicle;//set your vehicle however u do... GetClosestCar, etc
Ped driver;
GetDriverOfCar(vehicle, &driver);


edit: my bad scripthook has vehicle, ped and blip class like shdn. i thought they were handled differently... i dont use the c++ scripthook wink.gif

This post has been edited by Lord_of_Light on Tuesday, May 21 2013, 21:02
PM
  Top
 

 
Billsy93  
Posted: Tuesday, May 21 2013, 21:07
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 7, 2013

XXXXX



QUOTE (Lord_of_Light @ Tuesday, May 21 2013, 21:00)
yes i wanted u to post this code:

CODE
static void GetDriverOfCar(Vehicle vehicle, Ped *pPed) { NativeInvoke::Invoke<NATIVE_GET_DRIVER_OF_CAR, ScriptVoid>(vehicle, pPed); }


i recommend u write this in c#, c++ scripts dont have any performance benefits really and coding it is more a hassle for someone new...

c#

CODE
Ped driver = vehicle.GetPedOnSeat(VehicleSeat.Driver);//will crash if vehicle does not exist


c++

CODE
Vehicle vehicle;//set your vehicle however u do... GetClosestCar, etc
Ped driver;
GetDriverOfCar(vehicle, &driver);


edit: my bad scripthook has vehicle, ped and blip class like shdn. i thought they were handled differently... i dont use the c++ scripthook wink.gif

Hey,

I changed
CODE
if ((IsCharInAnyCar(GetPlayerPed()) == true) && (GetDriverOfCar(CurrentVehicle, &GetPlayerPed()) == ped))
to this
CODE
if ((IsCharInAnyCar(GetPlayerPed()) == true) && (GetDriverOfCar(CurrentVehicle, &ped)))
as it didn't like the "== true". However, now it still doesn't like the GetDriverOfCar part of the if condition as Visual Studio is saying it needs to be a boolean, how do I code the condition (if statement) correctly in this scenario?

Thanks
PM
  Top
 

 
Lord_of_Light  
Posted: Tuesday, May 21 2013, 21:17
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 21, 2013

XXXXX



your syntax is all wrong your asking if a void function is true or false

since your new to programming maybe .net would be better for u to learn and then once u understand .net and how programming works... something like learning c++ will be much easier

also the first way of checking if a void function equals a ped is also bad syntax

both lines u posted are not valid code

This post has been edited by Lord_of_Light on Tuesday, May 21 2013, 21:22
PM
  Top
 

 
Lord_of_Light  
Posted: Tuesday, May 21 2013, 21:24
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 21, 2013

XXXXX



CODE
if ((IsCharInAnyCar(GetPlayerPed()) == true) && (GetDriverOfCar(CurrentVehicle, &GetPlayerPed()) == ped))


should be

CODE

Ped ped;
GetDriverOfCar(CurrentVehicle, &ped)
if ((IsCharInAnyCar(GetPlayerPed()) == true) && (GetPlayerPed() == ped))


try that

when u check if values equal each other in an if statement, u need to be comparing same value types and u cant compare functions that return void... since u wont have anything to compare... these functions simply perform a task or process some value

This post has been edited by Lord_of_Light on Tuesday, May 21 2013, 21:27
PM
  Top
 

 
Lord_of_Light  
Posted: Wednesday, May 22 2013, 06:16
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 21, 2013

XXXXX



hey what u want the script to do im bored ill write if u want?

will be in .net because i dont believe in wasting time lol
PM
  Top
 

 
Lord_of_Light  
Posted: Wednesday, May 22 2013, 06:50
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 21, 2013

XXXXX



CODE
namespace SaveMyCar
{
   using System;
   using GTA;

   public class Main : Script
   {
       Blip blip;
       Vehicle playerVeh;

       public Main()
       {
           Tick += Main_Tick;
       }

       void Main_Tick(object sender, EventArgs e)
       {
           if (Game.LocalPlayer.Character.isInVehicle())
           {
               if (Game.Exists(playerVeh))
               {
                   if (playerVeh.isRequiredForMission) playerVeh.isRequiredForMission = false;
                   if (playerVeh != Game.LocalPlayer.Character.CurrentVehicle) playerVeh = Game.LocalPlayer.Character.CurrentVehicle;
               }
               else
               {
                   playerVeh = Game.LocalPlayer.Character.CurrentVehicle;
               }

               if (Game.Exists(blip)) blip.Delete();
           }
           else
           {
               if (Game.Exists(playerVeh) && playerVeh.isDriveable && !playerVeh.isRequiredForMission)
               {
                   playerVeh.isRequiredForMission = true;
                   if (!Game.Exists(blip))
                   {
                       blip = playerVeh.AttachBlip();
                       blip.Name = "Your Car";
                       blip.Scale = 0.5f;
                       blip.Color = (BlipColor)5;
                   }
               }
           }
       }
   }
}


.net is much easier to work with, u can see how simple it is to read the script and intellisense is so much better wink.gif

This post has been edited by Lord_of_Light on Wednesday, May 22 2013, 06:57
PM
  Top
 

 
Billsy93  
Posted: Wednesday, May 22 2013, 13:02
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 7, 2013

XXXXX



QUOTE (Lord_of_Light @ Wednesday, May 22 2013, 06:50)
CODE
namespace SaveMyCar
{
   using System;
   using GTA;

   public class Main : Script
   {
       Blip blip;
       Vehicle playerVeh;

       public Main()
       {
           Tick += Main_Tick;
       }

       void Main_Tick(object sender, EventArgs e)
       {
           if (Game.LocalPlayer.Character.isInVehicle())
           {
               if (Game.Exists(playerVeh))
               {
                   if (playerVeh.isRequiredForMission) playerVeh.isRequiredForMission = false;
                   if (playerVeh != Game.LocalPlayer.Character.CurrentVehicle) playerVeh = Game.LocalPlayer.Character.CurrentVehicle;
               }
               else
               {
                   playerVeh = Game.LocalPlayer.Character.CurrentVehicle;
               }

               if (Game.Exists(blip)) blip.Delete();
           }
           else
           {
               if (Game.Exists(playerVeh) && playerVeh.isDriveable && !playerVeh.isRequiredForMission)
               {
                   playerVeh.isRequiredForMission = true;
                   if (!Game.Exists(blip))
                   {
                       blip = playerVeh.AttachBlip();
                       blip.Name = "Your Car";
                       blip.Scale = 0.5f;
                       blip.Color = (BlipColor)5;
                   }
               }
           }
       }
   }
}


.net is much easier to work with, u can see how simple it is to read the script and intellisense is so much better wink.gif

Hey,

Thanks for this Lord, however, it doesn't quite do what I want it to do. When I tried your script, the first car I get in, gets a blip (which is good, as intended). However, if I get in another car, the blip for the first car still exists and doesn't get deleted. I want that to be deleted as the current car gets updated with the new car you are now in and for that to get a blip and so on, updating for every new car you enter. If that makes sense? What part of the code would you change in order for that to come into effect?

Cheers.
PM
  Top
 

 
Lord_of_Light  
Posted: Wednesday, May 22 2013, 16:33
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 21, 2013

XXXXX



QUOTE (Billsy93 @ Wednesday, May 22 2013, 13:02)

Hey,

Thanks for this Lord, however, it doesn't quite do what I want it to do. When I tried your script, the first car I get in, gets a blip (which is good, as intended). However, if I get in another car, the blip for the first car still exists and doesn't get deleted. I want that to be deleted as the current car gets updated with the new car you are now in and for that to get a blip and so on, updating for every new car you enter. If that makes sense? What part of the code would you change in order for that to come into effect?

Cheers.

When I tested entering multiple cars it worked, u donthave 2 scripts installed changing if vehicle is a mission vehicle?? Test my script alone to double check

Worked for me but I'll double check later

this may help u understand where the bug is coming from...

CODE
namespace SaveMyCar
{
   using System;
   using GTA;

   public class Main : Script
   {
       Blip blip;
       Vehicle playerVeh;

       public Main()
       {
           Tick += Main_Tick;
       }

       //this script manages two different states the player could be in... in a car or on foot

       void Main_Tick(object sender, EventArgs e)
       {
           if (Game.LocalPlayer.Character.isInVehicle())//Player is in vehicle
           {
               if (Game.Exists(playerVeh))//player car has been saved previously
               {
                   if (playerVeh.isRequiredForMission) playerVeh.isRequiredForMission = false;//removes save flag from previously saved car which may or may not be the current car the player is in, this script uses the ReqForMission vehicle property as a flag and only set true when exiting the car
                   if (playerVeh != Game.LocalPlayer.Character.CurrentVehicle) playerVeh = Game.LocalPlayer.Character.CurrentVehicle;//ensures player's current car is the new car to be saved
               }
               else//player car not previously saved
               {
                   playerVeh = Game.LocalPlayer.Character.CurrentVehicle;//this sets the first car player gets into
               }

               if (Game.Exists(blip)) blip.Delete();//deletes blip this script created so for u to get in another car and this blip not get deleted does not make sense, if in fact your blip isnt being deleted i believe u have a script installed with bad code and f*cking up gta memory, u usually will run into access violation errors that u can see in the console when this happens
           }
           else//Player is on foot
           {
               //removed... && playerVeh.isDriveable as i don't think it is necessary on 2nd thought and may confuse things

               if (Game.Exists(playerVeh) && !playerVeh.isRequiredForMission)//ensures a player car was saved to vehicle variable and it hasn't already been made a mission car, which is the flag this script relies on
               {
                   playerVeh.isRequiredForMission = true;
                   if (!Game.Exists(blip))
                   {
                       blip = playerVeh.AttachBlip();
                       blip.Name = "Your Car";
                       blip.Scale = 0.5f;
                       blip.Color = (BlipColor)5;
                   }
               }
           }
       }
       //so this script just constantly checks for a situation and when it finds it, runs a few lines of code and the following ticks, no code should run
       //just walk through my comments and see if u can determine where my logic breaks because i tested and works fine;)
   }
}


i kinda don't believe you since i tested last night and after reviewing code i see if u r in a vehicle... a blip will not be created by my script, it will only delete the blip it created before, then when ur on foot it can only create the blip once since the blip once and it even has to get through 2 checks to make another blip so this script can't lose track of the blip it creates... so im thinking u have another issue going on... and it did work perfect for me... read my comments in the script and let me know if it makes sense

every single if statement in this script is designed to only be true once for each time a player gets in and out of a vehicle so 99% of the time this script runs it just checks bools that route the script to just constantly return from the tick method

This post has been edited by Lord_of_Light on Wednesday, May 22 2013, 17:29
PM
  Top
 

 
Lord_of_Light  
Posted: Wednesday, May 22 2013, 18:25
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 21, 2013

XXXXX



ok i had someone else test the script and they said it worked fine... i am thinking u have another script installed messing stuff up

user posted image
PM
  Top
 

 
PacketOVerload_x64Bit  
Posted: Wednesday, May 22 2013, 22:30
Quote Post


Go Home Lens Effect, You're a Drunk Rainbow Nipple.
Group Icon
Group: Members
Joined: Mar 13, 2010

cd.gif

XXXXX



QUOTE (Lord_of_Light @ Wednesday, May 22 2013, 11:25)
ok i had someone else test the script and they said it worked fine... i am thinking u have another script installed messing stuff up

user posted image

Need to be careful with this individual. Just on GTAF this individual has had full conversations with himself (IV Coding Thread & ENB Screenshot Thread) using two or more accounts that were created by him for the sole purpose of spamming and getting his hate on. Someone said a while back that he had put a virus in one of his modifications. Scanning with AV is one part, but watch out for scripts from this individual. My 2˘.

-Packet
Users WebsitePM
  Top
 

 
Billsy93  
Posted: Thursday, May 23 2013, 11:58
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 7, 2013

XXXXX



QUOTE (Lord_of_Light @ Wednesday, May 22 2013, 16:33)
QUOTE (Billsy93 @ Wednesday, May 22 2013, 13:02)

Hey,

Thanks for this Lord, however, it doesn't quite do what I want it to do. When I tried your script, the first car I get in, gets a blip (which is good, as intended). However, if I get in another car, the blip for the first car still exists and doesn't get deleted. I want that to be deleted as the current car gets updated with the new car you are now in and for that to get a blip and so on, updating for every new car you enter. If that makes sense? What part of the code would you change in order for that to come into effect?

Cheers.

When I tested entering multiple cars it worked, u donthave 2 scripts installed changing if vehicle is a mission vehicle?? Test my script alone to double check

Worked for me but I'll double check later

this may help u understand where the bug is coming from...

CODE
namespace SaveMyCar
{
   using System;
   using GTA;

   public class Main : Script
   {
       Blip blip;
       Vehicle playerVeh;

       public Main()
       {
           Tick += Main_Tick;
       }

       //this script manages two different states the player could be in... in a car or on foot

       void Main_Tick(object sender, EventArgs e)
       {
           if (Game.LocalPlayer.Character.isInVehicle())//Player is in vehicle
           {
               if (Game.Exists(playerVeh))//player car has been saved previously
               {
                   if (playerVeh.isRequiredForMission) playerVeh.isRequiredForMission = false;//removes save flag from previously saved car which may or may not be the current car the player is in, this script uses the ReqForMission vehicle property as a flag and only set true when exiting the car
                   if (playerVeh != Game.LocalPlayer.Character.CurrentVehicle) playerVeh = Game.LocalPlayer.Character.CurrentVehicle;//ensures player's current car is the new car to be saved
               }
               else//player car not previously saved
               {
                   playerVeh = Game.LocalPlayer.Character.CurrentVehicle;//this sets the first car player gets into
               }

               if (Game.Exists(blip)) blip.Delete();//deletes blip this script created so for u to get in another car and this blip not get deleted does not make sense, if in fact your blip isnt being deleted i believe u have a script installed with bad code and f*cking up gta memory, u usually will run into access violation errors that u can see in the console when this happens
           }
           else//Player is on foot
           {
               //removed... && playerVeh.isDriveable as i don't think it is necessary on 2nd thought and may confuse things

               if (Game.Exists(playerVeh) && !playerVeh.isRequiredForMission)//ensures a player car was saved to vehicle variable and it hasn't already been made a mission car, which is the flag this script relies on
               {
                   playerVeh.isRequiredForMission = true;
                   if (!Game.Exists(blip))
                   {
                       blip = playerVeh.AttachBlip();
                       blip.Name = "Your Car";
                       blip.Scale = 0.5f;
                       blip.Color = (BlipColor)5;
                   }
               }
           }
       }
       //so this script just constantly checks for a situation and when it finds it, runs a few lines of code and the following ticks, no code should run
       //just walk through my comments and see if u can determine where my logic breaks because i tested and works fine;)
   }
}


i kinda don't believe you since i tested last night and after reviewing code i see if u r in a vehicle... a blip will not be created by my script, it will only delete the blip it created before, then when ur on foot it can only create the blip once since the blip once and it even has to get through 2 checks to make another blip so this script can't lose track of the blip it creates... so im thinking u have another issue going on... and it did work perfect for me... read my comments in the script and let me know if it makes sense

every single if statement in this script is designed to only be true once for each time a player gets in and out of a vehicle so 99% of the time this script runs it just checks bools that route the script to just constantly return from the tick method

This is very strange indeed. I've tried again and uninstalling some others mods, but to no avail. I still get an error message when I get into a second vehicle upon loading the game. The script works fine for the first car, as when a exit the blip is there etc, but when I get into another car, I get an error and the blip from the first doesn't get deleted and updated to the new car when I exit. Here's what the error message is saying.

Error during Tick in script 'SaveMyCar.Main':
GTA.NonExistingObjectException: Invalid call to an object that doesn't exist anymore!
at GTA.Blip.Delete()
at SaveMyCar.Main.Main_Tick(Object sender, EventArgs e)
at GTA.Script.TryTick()
at GTA.Script.DoTick()
at GTA.ScriptThread.OnTick()
PM
  Top
 

 
girish_is_gay  
Posted: Thursday, May 23 2013, 17:22
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 23, 2013

XXXXX



i believe u have some type of conflict going on being it from another script or maybe u r using 1.0.4 and something in the 0.4.0 scripthook isnt compatable

this is the line of code that caused the crash btw

CODE
if (Game.Exists(blip)) blip.Delete();


The exists part ensures the object exists in memory so it has something to delete. So for it to say yes it exists and then when it deletes a nanosecond (not actual time) later it doesn't exist means u have a memory issue. I believe your using an old scripthook for an older version gta or ur using a script that is using code wrong and putting wrong value types into memory and making gta confused to what is what. So even though it thinks a blip exists, it might be looking at something completely different... this is my guess just based on what ur saying
PM
  Top
 

 
Billsy93  
Posted: Thursday, May 23 2013, 19:07
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 7, 2013

XXXXX



QUOTE (girish_is_gay @ Thursday, May 23 2013, 17:22)
i believe u have some type of conflict going on being it from another script or maybe u r using 1.0.4 and something in the 0.4.0 scripthook isnt compatable

this is the line of code that caused the crash btw

CODE
if (Game.Exists(blip)) blip.Delete();


The exists part ensures the object exists in memory so it has something to delete. So for it to say yes it exists and then when it deletes a nanosecond (not actual time) later it doesn't exist means u have a memory issue. I believe your using an old scripthook for an older version gta or ur using a script that is using code wrong and putting wrong value types into memory and making gta confused to what is what. So even though it thinks a blip exists, it might be looking at something completely different... this is my guess just based on what ur saying

Cheers Girish,

I solved the issue now, you're right in identifying that it was to do with the blip deletion, the cause of the problem was where the code to delete the blip had been placed within the script. All is well, thanks for the help all.
PM
  Top
 

 
girish_is_gay  
Posted: Thursday, May 23 2013, 19:09
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 23, 2013

XXXXX



QUOTE (Billsy93 @ Thursday, May 23 2013, 19:07)
QUOTE (girish_is_gay @ Thursday, May 23 2013, 17:22)
i believe u have some type of conflict going on being it from another script or maybe u r using 1.0.4 and something in the 0.4.0 scripthook isnt compatable

this is the line of code that caused the crash btw

CODE
if (Game.Exists(blip)) blip.Delete();


The exists part ensures the object exists in memory so it has something to delete. So for it to say yes it exists and then when it deletes a nanosecond (not actual time) later it doesn't exist means u have a memory issue. I believe your using an old scripthook for an older version gta or ur using a script that is using code wrong and putting wrong value types into memory and making gta confused to what is what. So even though it thinks a blip exists, it might be looking at something completely different... this is my guess just based on what ur saying

Cheers Girish,

I solved the issue now, you're right in identifying that it was to do with the blip deletion, the cause of the problem was where the code to delete the blip had been placed within the script. All is well, thanks for the help all.

so why dont u share what fixed it?

and u have been talking to one person... faggot mods on here ban me over and over, so u can thank jitsuin, not all

This post has been edited by girish_is_gay on Thursday, May 23 2013, 19:11
PM
  Top
 

 
girish_is_gay  
Posted: Thursday, May 23 2013, 19:59
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 23, 2013

XXXXX



QUOTE (PacketOVerload_x64Bit @ Wednesday, May 22 2013, 22:30)
QUOTE (Lord_of_Light @ Wednesday, May 22 2013, 11:25)
ok i had someone else test the script and they said it worked fine... i am thinking u have another script installed messing stuff up

user posted image

Need to be careful with this individual. Just on GTAF this individual has had full conversations with himself (IV Coding Thread & ENB Screenshot Thread) using two or more accounts that were created by him for the sole purpose of spamming and getting his hate on. Someone said a while back that he had put a virus in one of his modifications. Scanning with AV is one part, but watch out for scripts from this individual. My 2˘.

-Packet

look at the fear in this one LMAO
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Pages: (2) [1] 2 

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG