View Full Version : how can i detect flag carrier
feanor
26th April 2017, 19:53
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?
IzNoGoD
26th April 2017, 21:00
Judging by ctf's code (which you could've read yourself also):
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
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.