SA-MP Forums Archive
[Include] KFU - Kavinsky Useful Functions (1.0) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] KFU - Kavinsky Useful Functions (1.0) (/showthread.php?tid=291115)



KFU - Kavinsky Useful Functions (1.0) - Kavinsky - 18.10.2011

KFU - Kavinsky Useful Functions
Hey all,

I would like to introduce you to a includes called KFU.
The KFU that includes or contains some useful functions for pawn sought by me, enough talking now I will explain includes features contained in.

Functions

Код:
/*******************************************************************************
* Function: IsPlayerInWater(playerid)
* Description: The IsPlayerInWater need to see if a player is swimming (so it does not work if you're in the water with a vehicle)
*******************************************************************************/

/*******************************************************************************
* Function: GetPlayerID(name[])
* Description: The GetPlayerID return the id of a player by name
*******************************************************************************/

/*******************************************************************************
* Function: GetPlayerFromIP(ip[])
* Description: The GetPlayerIDFromIP return the id of a player through its ip
*******************************************************************************/

/*******************************************************************************
* Function: ToUpperCase(string[])
* Description: The toUpperCase transforms the characters of a string from lowercase to uppercase
*******************************************************************************/

/*******************************************************************************
* Function: ToTiny(string[])
* Description: The ToTiny has the inverse function of toUpperCase, transforms the characters of a string from upper to lower case
*******************************************************************************/

/*******************************************************************************
* Function: IsPrimeNumber(number)
* Description: The IsPrimeNumber see if a number is prime or not
*******************************************************************************/

/*******************************************************************************
* Function: RandomBetweenNumbers(...)
* Description: The RandomBetweenNumbers creates a random number between the brackets
*******************************************************************************/

/*******************************************************************************
* Function: RandomBetweenCharacters(...)
* Description: The RandomBetweenCharacters creates a random one of the characters within the brackets
*******************************************************************************/
Credits:

~ Kavinsky (author include)
~ Angelo95

Pastebin.com


Re: KFU - Kavinsky Useful Functions (1.0) - Phanto90 - 18.10.2011

Seems copied from useful function and build as a useless include


Re: KFU - Kavinsky Useful Functions (1.0) - Homerman - 18.10.2011

Good one.


Re: KFU - Kavinsky Useful Functions (1.0) - Phanto90 - 18.10.2011

Quote:
Originally Posted by Homerman
Посмотреть сообщение
Good one.
I don't understand why people write without seeing what's thread about.


Re: KFU - Kavinsky Useful Functions (1.0) - Kavinsky - 18.10.2011

@Homerman: Thanks (:


Re: KFU - Kavinsky Useful Functions (1.0) - TheArcher - 18.10.2011

@Phanto90 I don't say you're lieing or something but before speaking need proofs. I see it's all regual except some functions like IsPlayerInWater...


Re: KFU - Kavinsky Useful Functions (1.0) - Phanto90 - 18.10.2011

Quote:
Originally Posted by TheArcher
Посмотреть сообщение
@Phanto90 I don't say you're lieing or something but before speaking need proofs. I see it's all regual except some functions like IsPlayerInWater...
Because that functions are copied by a thread useful function of an italian forum, also the creator told me he done it only because he thought it was more functional to use an include rather than using lines in a gamemode (his words)
Trust me, i know what i'm saying.


Re: KFU - Kavinsky Useful Functions (1.0) - playbox12 - 18.10.2011

Good job. For your IsPlayerInWater function, if you also want it to check for vehicles you could check if a player is in a vehicle then switch to another way of checking for example zone checking. What I personally would do is use OnVehicleDeath as thats also called when a vehicle enters water. (https://sampwiki.blast.hk/wiki/OnVehicleDeath). Overall it is nice.

(I do have to say that indeed most functions have already been made in the usefull functions topic, however it's always nice to have some together in one file).


Re: KFU - Kavinsky Useful Functions (1.0) - TheArcher - 18.10.2011

Quote:
Originally Posted by Phanto90
Посмотреть сообщение
Because that functions are copied by a thread useful function of an italian forum, also the creator told me he done it only because he thought it was more functional to use an include rather than using lines in a gamemode (his words)
Trust me, i know what i'm saying.
Whatever you say...I don't see anything wrong here but if you know that this is stolen. Report it.


Re: KFU - Kavinsky Useful Functions (1.0) - Sasino97 - 19.10.2011

Quote:
Originally Posted by Phanto90
Посмотреть сообщение
Because that functions are copied by a thread useful function of an italian forum, also the creator told me he done it only because he thought it was more functional to use an include rather than using lines in a gamemode (his words)
Trust me, i know what i'm saying.
You know what you are saying because you are the creator of that italian forum XD