This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.
Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting.
[FilterScript] Voucher system
Big Clucker
Join Date: Sep 2014
Location: Indonesia, Jakarta Timur
Posts: 54
Reputation: 0
|
Voucher system
Hello samp .!!
DOWNLOAD INCLUDE
Include Dini
Download: http://ift.tt/2a7L11w
Include sscanf2
Download: http://ift.tt/29Ddq14
Tutorial create Voucher system
CHECK <>
Do not forget to use include .
PHP Code:
#include <a_samp>
#include <sscanf2>
#include <dini>
next do not forget to add #define where the voucher will be saved in a folder.
PHP Code:
#define SERVER_VOUCHER_FILE "vhoucer/%d.ini"
after you 've finished creating the folder , do not forget to make the command
PHP Code:
CMD:voucher(playerid, params[])// This is a command to the server {
new code;
if(sscanf(params, "d", code)) // include
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /voucher <code>");
return 1;
}format(fstring, sizeof(fstring), SERVER_VOUCHER_FILE, code);
if(dini_Exists(fstring))
{
GivePlayerMoney(playerid, dini_Int(fstring, "pMoney")); //to get the reward player
format(nstring, sizeof(nstring), "SUCCES: You received %d Money .", dini_Int(fstring, "pMoney"));
dini_Remove(fstring); // Ini untuk remove data dini
} else {
SendClientMessage(playerid, COLOR_RED, "||==========================||");
SendClientMessage(playerid, COLOR_GREY, "ERROR: These vouchers is not available!!");
SendClientMessage(playerid, COLOR_GREY, "ERROR: Vouchers already taken someone !!");
SendClientMessage(playerid, COLOR_RED, "||==========================||");
}
return 1;
} CMD:voucherhelp(playerid,params[])
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /voucher (code)- use this command to claim code voucher" );
return 1;
} CMD:addvoucher(playerid, params[])
{
new code, pmoney;
if(sscanf(params, "dd", code, pmoney))
{
return SendClientMessage(playerid, COLOR_GREY, "USAGE: /addvoucher <code> <money>");
}
if(
pInfo[playerid][pAdminLevel] >= 10) //scipt use your gamemode admin
{
format(fstring, sizeof(fstring), SERVER_VOUCHER_FILE, code);
if(dini_Exists(fstring)) return SendClientMessage(playerid, COLOR_GREY, "ERROR: Vouchers that created the existing.");
dini_Create(fstring);
dini_IntSet(fstring, "pmoney", pmoney);
format(nstring, sizeof(nstring), "SUCCES: Voucher '%d' succes create.", code);
SendClientMessage(playerid, COLOR_WHITE, nstring);
}
return 1;
}
CREDITS
Incognito for Streamer Plugin
Yashas for Improved ZCMD
NOTES :
Dont forget add scipt dini you in "pmoney" for work received money.
System voucher is finished , if you have a comment, or there is an error I scipt please leave comment below
__________________
|
Aucun commentaire:
Enregistrer un commentaire