[Include] RomCookie - Inc. Edition!!
#1

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)
Reply
#2

simple nice useful !
Reply
#3

Thanks.
Reply
#4

So this is just variable setting?
Reply
#5

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.
Reply
#6

Nice,simple and useful
Reply
#7

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

Simple Nice
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)