|
|
|
Re: How do you find owner of a newly bought tank? [message #177595 is a reply to message #177564] |
Wed, 02 November 2005 23:06 |
|
ghostSWT
Messages: 262 Registered: December 2003
Karma: 0
|
Recruit |
|
|
rm5248 how are you with modifying scripts?
in ssaow 1.3.4
under
void M00_GrantPowerup_Created::Created(GameObject *obj) {
there is a
if (Settings_ShowPlayerPurchase) {
char PurchaseMsg[512];
sprintf(PurchaseMsg,"%s purchased a %s",Get_Player_Name(obj),Translate_Preset(IsPlayerVehicle(obj)));
FDSMessage(PurchaseMsg,"_PURCHASE");
}
Now i can be wrong but I think that can be used to do what you want. You can try something like saving the Get_Player_Name(obj)and IsPlayerVehicle(obj). Then when you need to, check if they match, if they don't then that player is in someone elses tank.
Keep in mind players die, leave, and lose vehicles(death/stolen) so you would have to keep track of those things.
[Updated on: Wed, 02 November 2005 23:07] Report message to a moderator
|
|
|
Re: How do you find owner of a newly bought tank? [message #177622 is a reply to message #177559] |
Thu, 03 November 2005 05:06 |
|
theplague wrote on Wed, 02 November 2005 19:44 | i'm just tryiny to find out the owner given the tank which has just been purchused by a player :S i just wanna know the obj, name or ID of that player... ie: how does the log know that "Player purchased a vehicle"?
- lots of thanks
|
Why do you need to know that?...
|
|
|
|
Re: How do you find owner of a newly bought tank? [message #177689 is a reply to message #177595] |
Thu, 03 November 2005 14:12 |
|
rm5248
Messages: 1156 Registered: November 2003 Location: USA
Karma: 0
|
General (1 Star) |
|
|
ghostSWT wrote on Thu, 03 November 2005 00:06 | rm5248 how are you with modifying scripts?
|
If that's C++ then I can't, but if it's Java I'd be able to do it in a few months probably, I'm taking a Java class at school...
So I've got no experience what so ever.
w00t?
|
|
|
Re: How do you find owner of a newly bought tank? [message #177702 is a reply to message #177559] |
Thu, 03 November 2005 15:11 |
|
YSLMuffins
Messages: 1144 Registered: February 2003 Location: Moved a long time ago (it...
Karma: 0
|
General (1 Star) Moderator - Mod Forum |
|
|
Seems like it would certainly be possible. Or else how does the player lock that reserves the vehicle for the first 30 seconds or so work?
-YSLMuffins
The goddess of all (bread products)
See me online as yslcheeze
|
|
|
|
|
|
Re: How do you find owner of a newly bought tank? [message #178673 is a reply to message #177559] |
Thu, 10 November 2005 12:21 |
dead6re
Messages: 602 Registered: September 2003
Karma: 0
|
Colonel |
|
|
Welcome to the untruely unclever way of detecting who is the owner of a new tank.
On the tanks object in object.aow you attach a script and add a void created. Then get this to go into the FDS log or DDE.
Wow, we figured how to find out what preset was created!!!
Now, remember that the FDS can tell us who purchased a vehicle?
So now,
Either
1) We find that a new preset has been created for nod or gdi so we wait to find out which team purchased that veichle because we can store which team the person is one.
2) We find that someone has purchased a new vehicle but we dont know what so we wait for the scripts.dll message and find out what preset it was.
One we have both message, we can output a nice combined string. Tad Ta!
Let all your wishes be granted except one, so you will still have something to strieve for.
|
|
|
Re: How do you find owner of a newly bought tank? [message #179080 is a reply to message #177559] |
Mon, 14 November 2005 02:55 |
|
mac
Messages: 1018 Registered: February 2003
Karma: 0
|
General (1 Star) Administrator/General |
|
|
brenbot just reads it from the logfile, it doesnt say what vehicle.
You can detect that a vehicle was created by hooking the object, but you cannot say yet who the owner is, who bought it... thats something for jonwil to add
Quote: |
danpaul88: buggy bugs brenbot because buggy befriends brainlessness
|
|
|
|
|