04.11.2012, 06:32
RomCookie - Inc. Edition!!
Last Updated: 04/11/2012
Introduction
I was bored, I'm checking all my releases, I found my old released Cookie System.
I decide to make a new version in include instead of filterscript.
Have fun.
BIG NOTE: Don't forget to cookie_PlayerInit OnPlayerConnect, Put it before loading player's cookie (if you make a saving system that save cookies)
How to install it?
To install it.
Copy an .inc file from your Server/pawno/include folder, Open it, Press CTRL+A, Now press Backspace, Now go to the RomCookie [Inc] Topic, Click the Downloadlink, Press CTRL+A, Right click on it, Press Copy, Go back to your Server/pawno/include folder, open the copied .inc, After opening the file, Paste it by using CTRL+V or right click.
If you don't know how to do this, PM me i will give you the .inc file.
Explanation
cookie_PlayerInit(playerid);
- Parameters: playerid
- Used for:
It sets player cookie to 0, Only called it OnPlayerConnect (because it build for that), Put it before loading player's cookie (If you made a saving system saves player cookie)
SetPlayerCookie(playerid, cookie);
- Parameters: playerid, cookie
- Used for:
Resets player cookie to 0 and set it to cookie value can be use for /setcookie.
ResetPlayerCookie(playerid);
- Parameters: playerid
- Used for:
Resets player cookie to 0.
AddPlayerCookie(playerid, cookie);
- Parameters: playerid, cookie
- Used for:
Adds a cookie by cookie value.
DecreasePlayerCookie(playerid, cookie);
- Parameters: playerid, cookie
- Used for:
Decrease a cookie by cookie value.
GetPlayerCookie(playerid)
- Parameters: playerid
- Used for:
Returns player cookie
Downloadlink
RomCookie - Pastebin (v1.0)