THREAD: [CODE] Get Models Name With BulletTrace
  1. 06-17-2015, 03:33 PM
    Loz's Avatar
    Loz
    Vault dweller
    Loz's Avatar
    Loz
    Vault dweller
    553
    Posts
    10,127
    Reputation
    Dec 2013
    NextGenUpdate
    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
  2. The Following 11 Users Say Thank You to Loz For This Useful Post:

    , , , , , , , , , ,