Edit to dialog input

DifaAnanda40

Member
Joined
Apr 12, 2014
Messages
21
Reaction score
0
Edit this code to dialog input please.
Code:
CMD:voucher(playerid, params[])
{
	new code;
 	if(sscanf(params, "d", code))
  	{
   		SendClientMessage(playerid, COLOR_WHITE, "USAGEF: /voucher [code]");
     	return 1;
   	}
	format(fstring, sizeof(fstring), VOUCHER_FILE, code);
 	if(dini_Exists(fstring))
  	{
 		GiveZaiatMoney(playerid, dini_Int(fstring, "Uang"));
 		format(nstring, sizeof(nstring), "BERHASIL: Kamu mendapatkan Uang sebesar "COE"$%d.", dini_Int(fstring, "Uang"));
     	SendClientMessage(playerid, COLOR_WHITE, nstring);
      	dini_Remove(fstring);
  	} 
	else 
	{
   		SendClientMessage(playerid, COLOR_WHITE, "ERROR: Code yang anda tulis, tidak bisa!");
   	}
    return 1;
}
Help me plz  :forever_opcode_alone:
 
Top