Post: [CODE] Get Models Name With BulletTrace
06-17-2015, 03:33 PM #1
Loz
Vault dweller
(adsbygoogle = window.adsbygoogle || []).push({}); aight, this is pretty simple & im quite sure its already been done in the past,
but its still very useful for .gsc creators & after i got asked for it earlier i decided to post this,
enough talking, ill let the code speak (works fine on both mp/zm)

    
ToggleTraceModel()
{
if(self.get_model==false)
{
self.get_model=true;
self thread TraceModel();
self iPrintlnBold("Model Name Gun ^2Enabled");
self iPrintln("Press [{+speed_throw}] On Objects");
}
else
{
self.get_model=false;
self notify("stop_get_model_name");
self iPrintlnBold("Model Name Gun ^1Disabled");
}
}

TraceModel()
{
self endon("disconnect");
self endon("stop_get_model_name");

for(;Winky Winky
{
if(self adsButtonPressed())
{
trace = bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*1000000,true,self);
model_name = trace["entity"].model;
self iPrintln("Model Name : ^2" + model_name);
wait 1;
}
wait 0.05;
}
}


Credits to whoever made something like this before

The following 11 users say thank you to Loz for this useful post:

-Numb, Buqsy, Full-Evil, gοd, HiddenHour, iRnZ, itsSorrow, Patrick, StonedYoda, xexDELL, xTiibo Modz
10-05-2015, 02:02 PM #11
where do u put this code so I can use it sorry im new the .gsc but I want to start making zombie land map edits and don't want to just use care package's
10-05-2015, 04:27 PM #12
Nice, i was thinking about if i should release this Awesome face Its very helpfull
10-05-2015, 07:56 PM #13
anthonything
Space Ninja
lol. No, i was looking for a model picker to implement into scar's menu, and i did a little looking around and had a bit of help from loz, to which i created the code similarly. Sometimes code may end up the same because it is the best, and there's only one best.
10-07-2015, 05:15 PM #14
how would I add this function to zombieland debug
02-03-2016, 02:23 AM #15
Is this actually working for all models in all maps, I point at a dumpster and it says nothing, Pretty much only coming up for cars.
02-03-2016, 03:26 AM #16
Originally posted by TheNiceUb3r View Post
Is this actually working for all models in all maps, I point at a dumpster and it says nothing, Pretty much only coming up for cars.


For me works on cars, players, killstreaks if it dont come up prolly not a model what i always figured
02-03-2016, 03:46 AM #17
Yes but if I load up Lime Editor on my PC version of it, It shows models that this thing is not even picking up some of which I got working attaching to my player etc.
02-03-2016, 03:31 PM #18
seanhellen
Are you high?
I have found it only picks up things you can do damage to. So itll work on car/killstreaks/player gun but it wont do anything if you aim at say a fence or rubbish bin
02-03-2016, 04:05 PM #19
fxyts
Keeper
Thanks for the code bud will be using this more and adding in models to ride and drive Happy

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo