SA-MP Forums Archive
Help , little please ? - 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)
+--- Thread: Help , little please ? (/showthread.php?tid=283085)



Help , little please ? - kaupopro - 13.09.2011

Код:
	if(strcmp(cmd, "/rpoodi", true) == 0)
	{
        if(PlayerToPoint(50, playerid,-23.6605,-52.9863,1003.5469))
		{
			if(timesrobbed[playerid] == 1)
			{
			    SendClientMessage(playerid, COLOR_YELLOW, "Sa saad rццvida poodi natukene hiljem.");
			}
			if(timesrobbed[playerid] == 0)
		    {
				GetPlayerName(playerid, sendername, sizeof(sendername));
				new robmoney = random(4000);
          		ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 0, 0, 0, 0, 0); // Rob
          		SendClientMessage(playerid, 0xFF0000FF, " ");
		        timesrobbed[playerid]+=1;
				format(string, sizeof(string), "** PEAKORTER: 24/7 Poodi on rццvitud !  **", sendername);
				SendRadioMessage(1, TEAM_BLUE_COLOR, string);
				WantedPoints[playerid]+=3; SetPlayerCriminal(playerid,255, "24/7 Poe Rццvimine");
				SendClientMessage(playerid, COLOR_YELLOW, "Sind nдhti kaamerate peal! Jookse ruttu minema!");
				format(string,sizeof(string), "* %s vхtab pхuest relva ja дhvardab sellega mььjat", sendername);
				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  				format(string, sizeof(string), "** Sa varastasid %dEEK!",robmoney);
   				SendClientMessage(playerid,COLOR_YELLOW,string);
				SafeGivePlayerMoney(playerid, robmoney);
 			}
		}
		return 1;
	}
How i can add here timer , that you have to wait 5 min until you get the money ?

If you could then plz , could you upload , code whit timer in it,


Re: Help , little please ? - Wesley221 - 13.09.2011

pawn Код:
SetTimerEx("MoneyTimer", (5 * 1000), false, "i", playerid); // add this to your command and change the 5 to the amount of minutes you want to wait till you get the money

forward MoneyTimer(playerid);
public MoneyTimer(playerid)
{
    GivePlayerMoney(playerid, amount of money here); // change the money amount in here
    return 1;
}
This would help you


Re: Help , little please ? - kaupopro - 13.09.2011

Could you attach it into code ?


Re: Help , little please ? - Wesley221 - 13.09.2011

Just give it some tries, and if it really wont work then post the error codes


Re: Help , little please ? - kaupopro - 13.09.2011

please ,