[Include] Basic Server Side Money
#1

TooBasic's Basic Server Side Money Include
Title says all.

Hello all! My first release
This is just a basic server side money include!

Whats it have?
It contains 4 functions to set, give, reset & get the players server side money.

Usages?
Код:
server_SetCash(playerid, cash)
server_GiveCash(playerid, cash)
server_ResetCash(playerid)
server_GetCash(playerid)
Any examples?
pawn Код:
#include <basicssm> // Top of your script below rest of includes, be sure to include a_samp

public OnPlayerConnect(playerid)
{
    server_SetCash(playerid, 10000);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    new msg[21]; format(msg, sizeof(msg), "You have $%i!", server_GetCash(playerid));
    SendClientMessage(playerid, -1, msg);
    return 1;
}

public OnPlayerDeath(playerid, killerid)
{
    server_SetCash(playerid, server_GetCash(playerid) -100);
    if(IsPlayerConnected(killerid)) { server_GiveCash(killerid, 100); }
    return 1;
}
Bugs?
None found so far

Download?
http://pastebin.com/CejG4z1h
Reply
#2

For your first release it's ok.
Good job.
Reply
#3

Thanks
Reply
#4

Great first release! Keep it up bud!
Reply
#5

awesome include for your first release.
Reply
#6

Thanks
Reply
#7

how i can make a .ini for these cash?
Reply
#8

Not bad
Reply
#9

wow, i use with my system of save stats
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)