[Include] KFU - Kavinsky Useful Functions (1.0)
#1

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
Reply
#2

Seems copied from useful function and build as a useless include
Reply
#3

Good one.
Reply
#4

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

@Homerman: Thanks (:
Reply
#6

@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...
Reply
#7

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.
Reply
#8

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).
Reply
#9

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.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)