SA-MP Forums Archive
[HELP] block sending money for 1 minute - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] block sending money for 1 minute (/showthread.php?tid=140659)



[HELP] block sending money for 1 minute - J. - 10.04.2010

how to block the sending of money for 1 minute? When he sent it has to wait 1 minute to send again!

Код:
 if(strcmp(cmd, "/money", true) == 0) {
    new Float:health;
    GetPlayerHealth(playerid, health);
    if(health < 30) return SendClientMessage(playerid, Vermelho, "His life is low and can not send money");
    if(GetPlayerMoney(playerid) > 20000) return SendClientMessage(playerid, RED, "Maximum allowable amount for sending money is $ 20,000!");
	  new tmp[256];
		tmp = strtok(cmdtext, idx);

		if(!strlen(tmp)) {
			SendClientMessage(playerid, COLOR_WHITE, "Use: /money [id] [AMOUNT]");
			return 1;
		}
		giveplayerid = strval(tmp);
        if(gArena[giveplayerid] == true){
           SendClientMessage(playerid, COLOR_WHITE, "Can not send money who's arena dm!");
		   return 1;
         }
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp)) {
			SendClientMessage(playerid, COLOR_WHITE, "Use: /money [id] [AMOUNT]");
			return 1;
		}
 		moneys = strval(tmp);