mardi 12 juillet 2016

[FilterScript] Voucher system

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

DefaultVoucher 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(playeridparams[])// This is a command to the server
{
        new 
code;
        if(
sscanf(params"d"code)) // include
        
{
            
SendClientMessage(playeridCOLOR_WHITE"USAGE: /voucher <code>");
            return 
1;
        }
format(fstringsizeof(fstring), SERVER_VOUCHER_FILEcode);
        if(
dini_Exists(fstring))
        {
                 
GivePlayerMoney(playeriddini_Int(fstring"pMoney"));  //to get the reward player
                 
format(nstringsizeof(nstring), "SUCCES: You received %d Money ."dini_Int(fstring"pMoney"));
                 
dini_Remove(fstring);  // Ini untuk remove data dini
        
} else {
                 
SendClientMessage(playeridCOLOR_RED"||==========================||");
                 
SendClientMessage(playeridCOLOR_GREY"ERROR: These vouchers is not available!!");
                 
SendClientMessage(playeridCOLOR_GREY"ERROR: Vouchers already taken someone !!");
                 
SendClientMessage(playeridCOLOR_RED"||==========================||");
        }
        return 
1;
}
CMD:voucherhelp(playerid,params[])
{
    
SendClientMessage(playeridCOLOR_GREY"USAGE: /voucher (code)- use this command to claim code voucher" );
    return 
1;
}
CMD:addvoucher(playeridparams[])
{
        new 
codepmoney;
        if(
sscanf(params"dd"codepmoney))
        {
            return 
SendClientMessage(playeridCOLOR_GREY"USAGE: /addvoucher <code> <money>");
        }

        if(

pInfo[playerid][pAdminLevel] >= 10)  //scipt use your gamemode admin
        
{
                
format(fstringsizeof(fstring), SERVER_VOUCHER_FILEcode);
                if(
dini_Exists(fstring)) return SendClientMessage(playeridCOLOR_GREY"ERROR: Vouchers that created the existing.");
                
dini_Create(fstring);
                
dini_IntSet(fstring"pmoney"pmoney);
                
format(nstringsizeof(nstring), "SUCCES: Voucher '%d' succes create."code);
                
SendClientMessage(playeridCOLOR_WHITEnstring);
        }
        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