Useful Functions doesn't work
#1

I wanted to use GetPlayerSpeed, GetPlayerVehicle and GetPlayerAcceleration, and i saw that that functions where included in UF. So, if i include the script, i get those errors, so i can't use UF.

Is there any way to use only GetPlayerSpeed, GetPlayerVehicle and GetPlayerAcceleration?

PS: I wanted to copy only that out of UF, and place it in another include, buti don't whats all from that functions.

Hope someone can help me

Errors:
Код:
F:\Stunt-X\pawno\include\uf.inc(459) : error 021: symbol already defined: "Time"
F:\Stunt-X\pawno\include\uf.inc(464) : error 021: symbol already defined: "Time"
F:\Stunt-X\pawno\include\uf.inc(3475) : error 021: symbol already defined: "mktime"
F:\Stunt-X\pawno\include\uf.inc(3505) : error 021: symbol already defined: "ValidEmail"
F:\Stunt-X\pawno\include\uf.inc(3510) : error 021: symbol already defined: "Now"
F:\Stunt-X\pawno\include\uf.inc(3518) : error 021: symbol already defined: "HexToInt"
F:\Stunt-X\pawno\include\uf.inc(3541) : error 021: symbol already defined: "IntToHex"
F:\Stunt-X\pawno\include\uf.inc(3562) : error 021: symbol already defined: "StrToInt"
F:\Stunt-X\pawno\include\uf.inc(3567) : error 021: symbol already defined: "IntToStr"
F:\Stunt-X\pawno\include\uf.inc(3574) : error 021: symbol already defined: "trunc"
F:\Stunt-X\pawno\include\uf.inc(3579) : error 021: symbol already defined: "SetPlayerMoney"
F:\Stunt-X\pawno\include\uf.inc(3585) : error 021: symbol already defined: "fcopy"
F:\Stunt-X\pawno\include\uf.inc(3604) : error 021: symbol already defined: "fcopytextfile"
F:\Stunt-X\pawno\include\uf.inc(3625) : error 021: symbol already defined: "frename"
F:\Stunt-X\pawno\include\uf.inc(3654) : error 021: symbol already defined: "StripNewLine"
F:\Stunt-X\pawno\include\uf.inc(3675) : error 021: symbol already defined: "ret_memcpy"
F:\Stunt-X\pawno\include\uf.inc(3703) : error 021: symbol already defined: "copy"
F:\Stunt-X\pawno\include\uf.inc(3725) : error 021: symbol already defined: "delete"
F:\Stunt-X\pawno\include\uf.inc(3738) : error 021: symbol already defined: "set"
F:\Stunt-X\pawno\include\uf.inc(3749) : error 021: symbol already defined: "equal"
F:\Stunt-X\pawno\include\uf.inc(3761) : error 021: symbol already defined: "mod"
F:\Stunt-X\pawno\include\uf.inc(3766) : error 021: symbol already defined: "div"
F:\Stunt-X\pawno\include\uf.inc(3771) : error 021: symbol already defined: "num_hash"
F:\Stunt-X\pawno\include\uf.inc(3782) : error 021: symbol already defined: "hash"
F:\Stunt-X\pawno\include\uf.inc(3790) : error 021: symbol already defined: "strreplace"
F:\Stunt-X\pawno\include\uf.inc(3809) : error 021: symbol already defined: "strlower"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#2

Open UF.inc or w/e it's called, ctrl+f and search for the functions you want and copy the functions/stocks/whatever they are to your script.
Reply
#3

Yeah, i wanted to do that, but i don't get it working then. Much more errors do i get, if i remove scripts from UF. So i don't know what to do

Even with a blank gamemode it won't work
Reply
#4

Which functions do you want from UF?
Reply
#5

I've sayd that:
GetPlayerSpeed, GetPlayerVehicle and GetPlayerAcceleration.
Reply
#6

What's so special about GetPlayerVehicle? The other two you'd be better off making yourself using a timer and working out the distance moved each time using pythagoras. That scripts appears to use 10 ms timers, which looks like a recipe for disaster..
Reply
#7

Pythagoras. Let's think... I know him, but really don't know how to use that in a script. Can you help me?

And you're right, GetPlayerVehicle isn't a difficult function..
Reply
#8

Pythagoras states that when a is the hypotenuse of a triangle, and b and c are the other sides, a^2 = b^2 + c^2.

If you have a line going from one corner of a cube to the opposite, the length of the line is root(side x side x side). So to find the distance a player moved since the last time you checked, work out the difference in X Y and Z, square these differences, add them, and root the lot. This gives you distance...

Speed = Distance/Time... you know Distance and Time by this stage, so you can work out the players speed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)