SA-MP Forums Archive
[Include] RomCookie - Inc. Edition!! - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] RomCookie - Inc. Edition!! (/showthread.php?tid=389932)



RomCookie - Inc. Edition!! - JaKe Elite - 04.11.2012

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)


Re: RomCookie - Inc. Edition!! - XtremeR - 04.11.2012

simple nice useful !


Re: RomCookie - Inc. Edition!! - JaKe Elite - 04.11.2012

Thanks.


Re: RomCookie - Inc. Edition!! - SuperViper - 04.11.2012

So this is just variable setting?


Re: RomCookie - Inc. Edition!! - Skillet` - 05.11.2012

Why you made an enum if you want to store only 1 number ?
and a suggestion - make it save the number of cookies in a file.


Re: RomCookie - Inc. Edition!! - Plovix - 10.11.2012

Nice,simple and useful


Re: RomCookie - Inc. Edition!! - linuxthefish - 10.11.2012

Quote:
Originally Posted by Plovix
Посмотреть сообщение
Nice,simple and useful
How is it useful?


Re: RomCookie - Inc. Edition!! - Team_PRO - 11.11.2012

Simple Nice