Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

LY (Unsigned Long)

Hello, I would like to present the function to use the "unsigned long", or at least to increase the limit of numbers to

ID
d6ouivnilegovhg7bqo0
author
abyssmorgan's avatar

AbyssMorgan

@abyssmorgan


View profile
Copy link
  Report member
started
Apr 18, 2021
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Libraries
LY (Unsigned Long)
abyssmorgan's avatar

AbyssMorgan

@abyssmorgan


View profile
Copy link
  Report member
• 5y
Libraries

LY (Unsigned Long)

library

Hello, I would like to present the function to use the "unsigned long", or at least to increase the limit of numbers to

2 147 483 647 000 000 000





LY.inc

Copyright ? 2021 Abyss Morgan. All rights reserved.



Website: https://adm.ct8.pl



Plugins: None

Modules: None



File Version: 1.6.1



Pawn Unsigned Long for 32 Bit language (precision 61-bit)

Available limit:

0 - 2 147 483 647 000 000 000

0 - 2 000 000 000 000 000 000



Functions:

IsValueContainLY(prefix,suffix,value);

GetLYString(prefix,suffix,string[],maxdest = sizeof(string));

LYStringToLY(&prefix,&suffix,const string[]); //Reverse to GetLYString

UpdateLY(&prefix,&suffix,value,limitprefix = DEFAULT_MAX_LY_PREFIX);

AddSeparatorLY(string[],const separator[]);

DeleteSeparatorLY(const string[],const separator[]);

CalculatePercentLY(&prefix,&suffix,Float:percent = 0.0,increase = true,limitprefix = DEFAULT_MAX_LY_PREFIX);

GetPercentLY(prefix,suffix,&o_prefix,&o_suffix,Float:percent = 0.0,limitprefix = DEFAULT_MAX_LY_PREFIX);



Operators:

IsLYEqual(prefix,suffix,from_prefix,from_suffix);

IsLYSmallerThan(prefix,suffix,from_prefix,from_suffix);

IsLYSmallerThanOrEqual(prefix,suffix,from_prefix,from_suffix);

IsLYBiggerThan(prefix,suffix,from_prefix,from_suffix);

IsLYBiggerThanOrEqual(prefix,suffix,from_prefix,from_suffix);





Example for bank system:



pVar[playerid][pMoney] - your variable suffix 

pVar[playerid][pMoneyLY] - your variable prefix 

//adding money to the bank 

UpdateLY(pVar[playerid][pMoneyLY], pVar[playerid][pMoney], amount); //<-- set your amount 

GivePlayerMoney(playerid,-amount); 

//the payment from the bank 

if(IsValueContainLY(pVar[playerid][pMoneyLY], pVar[playerid][pMoney], amount)){ //<-- set your amount 

? ? UpdateLY(pVar[playerid][pMoneyLY], pVar[playerid][pMoney], -amount); 

? ? GivePlayerMoney(playerid,amount); 

} else { 

? ? //you do not have enough money 

}

//The amount of money in bank 

new mymoney[LY_STRING_LEN], buffer[128]; 

GetLYString(pVar[playerid][pMoneyLY], pVar[playerid][pMoney], mymoney); 

format(buffer,sizeof buffer,"You money in bank: %s",mymoney); 

SendClientMessage(playerid,-1,buffer);? 





Download:

LY.inc

0 likes0 replies

    Please sign up or log in to reply