Wait a certained time before you receive money.
#4

Quote:
Originally Posted by Jack.7331
Посмотреть сообщение
if(strcmp("/money", cmdtext, true, 10) == 0)
{
SendClientMessageEx(playerid, COLOR_RED, "You will receive your money in five minutes.");
SetTimerEx("giveplayermoney", 30000, false, "d", playerid);
}

forward giveplayermoney(playerid);
public giveplayermoney(playerid)
{
GivePlayerMoney(playerid, MONEY HERE);
SendClientMessage(playerid, COLOR_RED, "You have received your money!");
return 1;
}
Well the /money was just for example. This worked without any compile errors. But doesnt work. It does it directly.

Here is the bit of code.

pawn Код:
// ==== Above in script ==== //
forward giveplayermoney(playerid);
public giveplayermoney(playerid);
// ==== Above in script ==== //

if (IsPlayerInRangeOfPoint(playerid, 7.0,CheckpointMainEnd))
     {
         SendClientMessage(playerid, COLOR_GREEN,"Calvin Miller says: 'Thanks mate, I will deposit the money to your bank soon!'");
         DisablePlayerCheckpoint(playerid);
         deliveryjobrunning = 0;
         SetTimerEx("giveplayermoney", 300000, false, "d", playerid);
         GivePlayerMoney(playerid, random(200) + 300); // CHANGE TO BANK
         SendClientMessage(playerid, COLOR_RED,"You just received a payment from 'Calvin Miller' on your bank.");
     }
the script itself works, this checkpoint aswell, its just the timer thing.
Ignore the "//CHANGE TO BANK" that is for my scripter.
Reply


Messages In This Thread
Wait a certained time before you receive money. - by Verth - 10.07.2013, 18:21
AW: Wait a certained time before you receive money. - by roym899 - 10.07.2013, 18:45
Re: Wait a certained time before you receive money. - by Jack.7331 - 10.07.2013, 19:04
Re: Wait a certained time before you receive money. - by Verth - 10.07.2013, 22:14

Forum Jump:


Users browsing this thread: 3 Guest(s)