Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:setcode(playerid, params[])
- {
- new code;
- new money, score;
- if(sscanf(params, "ddd", code, money, score))
- {
- return SendClientMessage(playerid, COLOR_GREY, "USAGE: /setcode (code) (money) (score) ");
- }
- if(IsPlayerAdmin(playerid))
- {
- format(fstring, sizeof(fstring), VOUCHER_FILE, code);
- if(dini_Exists(fstring)) return SendClientMessage(playerid, COLOR_GREY, "ERROR: Voucher Code ini sudah ada, dan tidak bisa di buat kembali dengan code yang sama.");
- dini_Create(fstring);
- dini_IntSet(fstring, "Uang", money);
- dini_IntSet(fstring, "Scoree", score);
- format(nstring, sizeof(nstring), "SUCCES: Code '%d' Berhasil di buat.", code);
- SendClientMessage(playerid, COLOR_GREY, nstring);
- }
- else SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement