Help me do this - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me do this (
/showthread.php?tid=653958)
Help me do this -
Astonish - 17.05.2018
Hello, I have a fish system in my server but i want to improve it a bit in the server the max holdable fish is 5 what i want is something like a fish cooler and if player have the cooler they can store up to 50 fishes so is it possible? something like
https://sampforum.blast.hk/showthread.php?tid=575907
Re: Help me do this -
JasonRiggs - 17.05.2018
Sure, You can make it easily..
In the player enums add this..
and set it to 1 when the player buys it,
PHP код:
PlayerInfo[playerid][pCooler] = 1
Then go and make a check at the fishes check place and check if the pCooler is 1 then allow him to have 50 fishes, if it's 0 then make him just have 5.
Re: Help me do this -
GTLS - 18.05.2018
Quote:
Originally Posted by JasonRiggs
Sure, You can make it easily..
In the player enums add this..
and set it to 1 when the player buys it,
PHP код:
PlayerInfo[playerid][pCooler] = 1
Then go and make a check at the fishes check place and check if the pCooler is 1 then allow him to have 50 fishes, if it's 0 then make him just have 5.
|
You also probably want to save all the fishes he caught... You can create an array for fish inventory of size, MAX_FISH_INV and can store the fish inside.
Re: Help me do this -
JasonRiggs - 18.05.2018
Quote:
Originally Posted by GTLS
You also probably want to save all the fishes he caught... You can create an array for fish inventory of size, MAX_FISH_INV and can store the fish inside.
|
Can be an array, and can be an enum, But I believe there is one already which detects if the person got 5 fishes then don't give him more, and stores the amount of fishes he got tho..