04.08.2014, 15:05
(
Последний раз редактировалось codectile; 08.06.2015 в 15:20.
Причина: Update
)
CRF Library
Introduction
This is a third party library for pawn/sa-mp, this consists of seven(7) (will be updating with more libraries) main libraries. These libraries will give you freedom of utilizing it in any way you want it to, CRF libraries will provide many useful function to the pawn scripters.
Libraries
• c_arlib: Array element sorting and searching library.
• c_rclib: Recreational mathematics library.
• c_strlib: String manipulation library.
• c_utils: Misc. library, contains function which can be very useful.
• c_stclib: Player State Checkers with some add-on functions.
• c_cblib: Callbacks
• crf: All in one library, contains all main libraries.
Updates
• Update 1
• Update 2
• Update 3
• Update 4
Function List
Note: A detailed description is provided in the README.txt.
Include Guide
Extract the "CRF" folder to "\pawno\includes".
Including libraries:
Bugs
If you find any bug please report it in this thread.
Credits
• Sa-Mp Team
Download
******Drive
Introduction
This is a third party library for pawn/sa-mp, this consists of seven(7) (will be updating with more libraries) main libraries. These libraries will give you freedom of utilizing it in any way you want it to, CRF libraries will provide many useful function to the pawn scripters.
Libraries
• c_arlib: Array element sorting and searching library.
• c_rclib: Recreational mathematics library.
• c_strlib: String manipulation library.
• c_utils: Misc. library, contains function which can be very useful.
• c_stclib: Player State Checkers with some add-on functions.
• c_cblib: Callbacks
• crf: All in one library, contains all main libraries.
Updates
• Update 1
• Update 2
• Update 3
• Update 4
Function List
pawn Код:
c_arlib:
• BubbleSort(array[],length,bool:AscOrDes)
• SelectionSort(array[],length,bool:AscOrDes)
• InsertionSort(array[],length,bool:AscOrDes)
• quickSortAsc(array[],left,right)
• quickSortDes(array[],left,right)
• LinearSearch(array[],length,ToSearch)
• BinarySearch(array[],length,ToSearch)
• SwapElement(Array,element1,element2)
• ElementPos(Array[],element)
c_rclib:
• IsArmstrong(value)
• IsNeon(value)
• IsPerfect(value)
• IsPrime(value)
• IsMagic(value)
• IsEvenOrOdd(value)
• MaxDigit(value)
• MinDigit(value)
• DigitFreq(value)
• Truncate(Float:value)
• ToPositive(Float:value)
• ToNegitive(Float:value)
• Calculate(Float:number1,Float:number2,choice)
• SumFirstLast(value)
• NumberLength(value)
• Pow(value,pow)
• MiddleDigit(value)
c_strlib:
• isPalindrome(input[])
• isDigit(character[])
• isLetter(character[])
• isSpace(character[])
• isUnderscore(character[])
• isSpecial(character[])
• isAnagram(string1[],string2[])
• isUpperCase(character[])
• isLowerCase(character[])
• isNumeric(string[])
• isAlphaNumeric(string[])
• ToPalindrome(input[])
• toUpperCase(string[])
• toLowerCase(string[])
• Find(haystack[],needle[],bool:Case)
• Frequency(string[],character[])
• WordFreq(string[],word[],bool:Case)
• Equals(string1[],string2[])
• ExtNum(string[])
• ExtStr(string[])
• Reverse(string[])
• ReplaceChar(string[],character[],replacewith[])
• FirstIndexOf(string[],character[])
• LastIndexOf(string[],character[])
• Compare(string1[],string2[])
• Concat(string1[],string2[])
• Substring(string[],firstindex,lastindex)
• null(string[])
• CharAt(string[],index)
• StringDel(string[],fromindex,toindex)
• FindChar(string[],tofind[])
c_utils:
• PingKick(playerid,Amount)
• AddHydraulic(vehicleid)
• AddNitro(vehicleid,Amount)
• EnableRangeSuntBonus(playerid,Float:Range,Float:x,Float:y,Float:z,bool:enable)
• EnableRangeSuntBonusForAll(playerid,Float:Range,Float:x,Float:y,Float:z,bool:enable)
• PlayerToClass(playerid) //Forces player to class selection.
• GetDistanceBetweenObjects(objectid1,objectid2)
• GetDistanceBetweenPO(playerid,objectid) //Returns the distance between a player and an object.
• GetDistanceBetweenPV(playerid,vehicleid) //Returns the distance between a player and a vehicle.
• GetDistanceBetweenPlayers(playerid,targetid)
• GetDistanceBetweenVehicles(vehicleid1,vehicleid2)
• IsTargetInRangeBetweenPlayers(targetid,playerid1,playerid2)
• CreatePlayerRangeGravity(playerid,Float:Range,Float:x,Float:y,Float:z,Float:gravity,vw=0) //YSF
• SetGravityForAll(Float:gravity) //YSF
• CreateRangeGravityForAll(Float:Range,Float:x,Float:y,Float:z,Float:gravity,vw=0)//YSF
• IncreaseGravity(playerid,increaseby)//YSF
• GetBulletShotDistance(playerid)
c_stclib:
State Checkers:
* IsPlayerFalling(playerid)
* IsPlayerRunning(playerid)
* IsPlayerCrouching(playerid)
* IsPlayerInWater(playerid)
* IsPlayerSwimming(playerid)
* IsPlayerJumping(playerid)
* IsPlayerEnteringInterior(playerid)
* IsPlayerStanding(playerid)
* IsPlayerClimbing(playerid)
* IsPlayerMovingWhileAiming(playerid)
* IsPlayerGettingUp(playerid)
* IsPlayerPissing(playerid)
* IsPlayerUsingJP(playerid)
* IsPlayerGettingInitialised(playerid)
* IsPlayerSelectingClass(playerid)
* IsPlayerDriver(playerid)
* IsPlayerPassenger(playerid)
* IsPlayerSpectating(playerid)
* IsPlayerInAir(playerid)
* IsPlayerGliding(playerid)
* IsPlayerOpeningCarDoor(playerid)
* IsPlayerOpeningTruckDoor(playerid)
* IsPlayerBlocking(playerid)
Functions:
* GetPlayerParaState(playerid)
* GetBikeEnteringStyle(playerid)
* GetCarEnteringStyle(playerid)
* KicForOffensiveWeapon(offensive_weapon,targetid)
CallBacks:
• OnPlayerSkydiving(playerid)
• OnPlayerFall(playerid)
• OnPlayerMovingWhileAiming(playerid)
• OnPlayerSwim(playerid)
• OnPlayerBlock(playerid)
• OnPlayerStandIdle(playerid)
• OnPlayerAmmoZero(playerid) //Mind the melee weapons
• OnPlayerJump(playerid)
• OnPlayerCrouch(playerid)
• OnPlayerUseJetpack(playerid)
• OnPlayerConnectWithRolePlayName(playerid);
Include Guide
Extract the "CRF" folder to "\pawno\includes".
Including libraries:
pawn Код:
#include <CRF\include name> //Mind the slash.
Bugs
If you find any bug please report it in this thread.
Credits
• Sa-Mp Team
Download
******Drive