Server Help

Bot Questions - No flags in the safe zone please :P

Kliff - Fri May 23, 2003 5:16 pm
Post subject: No flags in the safe zone please :P
Are there any plugins that would spec a player or nuet flags of whoever brought flags in a safe zone? Anything like that?
ExplodyThingy - Fri May 23, 2003 11:48 pm
Post subject:
if (p->flags > 0 && p->safty == true)
sendPrivate(p,"*setship");

i forget whether the p->safety is bool or int, but you can figure that out.
As for p->flags, if there isnt such a thing ( i wouldnt know, never needed to know) just tag them at the EVENT_FlagGrab

ScottMitch has a done all the work on that for a OF bot, kept very acurate count of flaggers, as the former flag data for the killed flagger is lost in EVENT_PlayerDeath.



But assuming your not a script whore like the rest of use, you want a quick and dirty? ill write as soon as you say yes. (i am that much of a loser)
k0zy - Sat May 24, 2003 11:54 am
Post subject:
Code: Show/Hide
if (p->safety)

will do fine icon_smile.gif

Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
Kliff - Sat May 24, 2003 4:49 pm
Post subject:
Yes very correct, i dunno what the hell that is just yet tongue.gif. I would much appreciate it biggrin.gif (Yes)
ExplodyThingy - Sun May 25, 2003 8:58 pm
Post subject:
Kliff wrote:
Yes very correct, i dunno what the hell that is just yet tongue.gif. I would much appreciate it biggrin.gif (Yes)
Want the nerd explanation or the really gummed-down one?
Kliff - Sun May 25, 2003 9:09 pm
Post subject:
How about both? I dunno really much of anything with programming just yet
Smong - Mon May 26, 2003 1:56 pm
Post subject:
Does this help?
if (p->safety)
is the same as
if (p->safety == true) //true is anything but 0 (usually 1)

Also
if (!p->safety)
is the same as
if (p->safety == false) //false is always 0
Rubu - Mon May 26, 2003 9:56 pm
Post subject:
I dont know any of that icon_rolleyes.gif
Kliff - Tue May 27, 2003 5:20 pm
Post subject:
(Rubu) icon_rolleyes.gif
Helicon - Tue May 27, 2003 9:01 pm
Post subject:
do you know C++????
ExplodyThingy - Thu May 29, 2003 8:31 pm
Post subject:
Cripes. "p" is a pointer.
Its set up thusly "Player *p"
the safty "class?" (I forget what the hell the parts of classes are called) is boolen (true or flase) i believe. Either that or int (0 or non-0).
flags is an int that counts the number of flags on that player. if its 0, then the conditional will resolve false (ie: the if statement ill not be true), therfore making it not catch if p has no flags.

Go read a book.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group