Results 1 to 2 of 2

Thread: how can i detect flag carrier

  1. #1
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts

    how can i detect flag carrier

    hi i made an anti-camp script , but i have a little problem with flag carriers . flag carriers must stay same places so it sucks when u carrying a flag. how can i detect a flag carrier?

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Judging by ctf's code (which you could've read yourself also):

    PHP Code:
    attachFlag()
    {
        if(
    isdefined(self.flagAttached))
            return;

        if(
    self.pers["team"] == "allies")
            
    flagModel "xmodel/prop_flag_" game["axis"] + "_carry";
        else
            
    flagModel "xmodel/prop_flag_" game["allies"] + "_carry";
        
        
    self attach(flagModel"J_Spine4"true);
        
    self.flagAttached true;
        
        
    self thread createHudIcon();

    you could check isdefined([player].flagattached) && [player].flagattached
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. The Following 2 Users Say Thank You to IzNoGoD For This Useful Post:

    feanor (27th April 2017),kung foo man (26th April 2017)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •