SA-MP Forums

Go Back   SA-MP Forums > SA-MP > General

Closed Thread
 
Thread Tools Display Modes
Old 17/10/2007, 04:16 PM   #21
kaisersouse
High-roller
 
kaisersouse's Avatar
 
Join Date: Jun 2006
Location: Subaru Forester
Posts: 2,792
Reputation: 1011
Default Re: Little Suggestions for SA:MP 0.3

Quote:
Originally Posted by BeckzyBoi

Position in the air-Position on the ground?

Surely you have at some point in your life done subtraction?..

Ok then smartass...what do i use for a reference point for ground Z if there is nothing (like another player standing on the ground) to use as reference? The abandoned airfield ground Z is ~ 16. The top of Chiliad is ~400. If I'm in a plane and want to create an explosion...on the ground...directly underneath me...how would I determine the Z value to use for that explosion and put it exactly at ground level in either place? Obviously you can't use 0 because 99% of the time thats underneath the map. If there was a player on the ground, I would GetPlayerPos that person and use their Z value. Thats a no brainer.

What I want to know it how to figure out where exact ground level is depending on the pilot's current X,Y...without using a vehicle or player as a reference point. Since you seem to know the answer, I'd LOVE to hear your insight on the subject.
__________________
Life is like a box of cheap-ass no cocoa garbage dollar-store chocolate.
kaisersouse is offline  
Old 17/10/2007, 04:25 PM   #22
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,193
Reputation: 135
Default Re: Little Suggestions for SA:MP 0.3

As there isn't a GetPlayerPosFindZ you can:

pawn Code:
new Float:pos[4];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPosFindZ(playerid, pos[0], pos[1], pos[2]);
GetPlayerPos(playerid, pos[0], pos[1], pos[3]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);

Then pos[3] will be the Z of the ground below the player and pos[2] will be where to player is now so to work out the difference you would then do:

pawn Code:
pos[2] -= pos[3];
or
pawn Code:
floatsub(pos[2], pos[3]);

It's hardly rocket science so i don't know why you are calling me a "smartass"..
BeckzyBoi is offline  
Old 17/10/2007, 04:42 PM   #23
kaisersouse
High-roller
 
kaisersouse's Avatar
 
Join Date: Jun 2006
Location: Subaru Forester
Posts: 2,792
Reputation: 1011
Default Re: Little Suggestions for SA:MP 0.3

If that works, then I will come back and thank you. Either way:

Quote:
Surely you have at some point in your life done subtraction?..
I used "smartass" because "arrogant jerk" just seemed a bit too harsh.
__________________
Life is like a box of cheap-ass no cocoa garbage dollar-store chocolate.
kaisersouse is offline  
Old 17/10/2007, 04:47 PM   #24
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,193
Reputation: 135
Default Re: Little Suggestions for SA:MP 0.3

Quote:
Originally Posted by kaisersouse
If that works, then I will come back and thank you. Either way:

Quote:
Surely you have at some point in your life done subtraction?..
I used "smartass" because "arrogant jerk" just seemed a bit too harsh.
And both seemed unnecessary seeing as though knowing how to subtract, especially with pawn where you don't need to do calculations as it works out the answer for you, is not really being smart..

If you don't like that idea then maybe create a basketball or something at the player and give it 10 seconds to drop, once it has dropped then get the object's position and work out the difference.
BeckzyBoi is offline  
Old 17/10/2007, 04:52 PM   #25
kaisersouse
High-roller
 
kaisersouse's Avatar
 
Join Date: Jun 2006
Location: Subaru Forester
Posts: 2,792
Reputation: 1011
Default Re: Little Suggestions for SA:MP 0.3

Quote:
Originally Posted by BeckzyBoi
Quote:
Originally Posted by kaisersouse
If that works, then I will come back and thank you. Either way:

Quote:
Surely you have at some point in your life done subtraction?..
I used "smartass" because "arrogant jerk" just seemed a bit too harsh.
And both seemed unnecessary seeing as though knowing how to subtract, especially with pawn where you don't need to do calculations as it works out the answer for you, is not really being smart..

If you don't like that idea then maybe create a basketball or something at the player and give it 10 seconds to drop, once it has dropped then get the object's position and work out the difference.
Nope, basic subtraction doesn't require much in the way of brains. My issue was trying to get the original values that required the subtraction. Your second post on that issue (the one that actually helped) was far more useful than the first (holier-than-thou pointing out of the obvious).
__________________
Life is like a box of cheap-ass no cocoa garbage dollar-store chocolate.
kaisersouse is offline  
Old 17/10/2007, 07:00 PM   #26
pLaTaNo
Little Clucker
 
Join Date: Oct 2007
Posts: 11
Reputation: 0
Default Re: Little Suggestions for SA:MP 0.3

Talkin about Basketball, how about putting that Basketball Mini-Game from SP?

Hehe, you can play basketball games with other people in a Server on the Courts. This will add Fun on some servers if this gets synced and implemented on 0.3
pLaTaNo is offline  
Old 17/10/2007, 11:03 PM   #27
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,193
Reputation: 135
Default Re: Little Suggestions for SA:MP 0.3

Speaking of those type of native commands. Please remove /save and /interior from servers like you did with /kill. Just make them debug commands only. It is very easy to make /save and /interior for yourself anyway in your script if you would still like to keep them.
BeckzyBoi is offline  
Old 18/10/2007, 12:03 PM   #28
[PHX]Randy
Little Clucker
 
Join Date: Jun 2007
Posts: 29
Reputation: 0
Default Re: Little Suggestions for SA:MP 0.3

Be cool if the combine was synced so when you ran people over with it it appears they go throught the combine instead of under it.
[PHX]Randy is offline  
Old 18/10/2007, 12:50 PM   #29
kaisersouse
High-roller
 
kaisersouse's Avatar
 
Join Date: Jun 2006
Location: Subaru Forester
Posts: 2,792
Reputation: 1011
Default Re: Little Suggestions for SA:MP 0.3

Quote:
Originally Posted by BeckzyBoi
Speaking of those type of native commands. Please remove /save and /interior from servers like you did with /kill. Just make them debug commands only. It is very easy to make /save and /interior for yourself anyway in your script if you would still like to keep them.
I don't understand why having /save and /interior would hurt anything.
__________________
Life is like a box of cheap-ass no cocoa garbage dollar-store chocolate.
kaisersouse is offline  
Old 18/10/2007, 01:27 PM   #30
[PHX]Randy
Little Clucker
 
Join Date: Jun 2007
Posts: 29
Reputation: 0
Default Re: Little Suggestions for SA:MP 0.3

I would like them to be like a toggle, so then if your paranoid you can stop people ripping your script.

ScriptCommands(1);

:P
[PHX]Randy is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Suggestions for A/D [Ace]Stealth Help Archive 0 10/03/2010 12:38 AM
suggestions aircombat Help Archive 3 26/02/2010 12:30 AM
[Need]Suggestions Tigerbeast11 Help Archive 8 05/11/2009 04:51 PM
Suggestions ! Daem Help Archive 17 10/09/2009 09:57 PM
NPC suggestions Finn Help Archive 2 03/09/2009 02:03 PM


All times are GMT. The time now is 09:59 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.