Payday - 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: Payday (
/showthread.php?tid=166128)
Payday -
Luis- - 07.08.2010
I made a Payday Timer set for 1 minute but it is not working,
pawn Код:
SetTimer("Payday", GivePlayerMoney, 1, true);
return 1;
}
forward Payday();
public Payday()
{
new Payday;
Payday = GivePlayerMoney(playerid, 1000);
SendClientMessage(playerid, COLOR_RED, "..:Payday:..");
SendClientMessage(playerid, COLOR_WHITE, "You have recieved $1000 in to your bank"
SendClientMessage(playerid, COLOR_RED, "Spend it wisley!");
return 1;
}
Help D:
Re: Payday -
ViruZZzZ_ChiLLL - 07.08.2010
First of all, I'm assuming you want the timer for a certain player only,
not global :
pawn Код:
SetTimerEx("Payday", 60000, true, "i", playerid);
forward Payday(playerid);
public Payday(playerid)
{
GivePlayerMoney(playerid, 1000);
SendClientMessage(playerid, COLOR_RED, "..:Payday:..");
SendClientMessage(playerid, COLOR_WHITE, "You have recieved $1000 in to your bank"
SendClientMessage(playerid, COLOR_RED, "Spend it wisley!");
return 1;
}
and second, please read this :
SetTimer :
https://sampwiki.blast.hk/wiki/SetTimer
SetTimerEx :
https://sampwiki.blast.hk/wiki/SetTimerEx
Remember! : 1000 = 1 second.
Re: Payday -
Luis- - 07.08.2010
Does not seem to work.. :/
Re: Payday -
Luis- - 07.08.2010
Anyone else no haw i can fix this?
Re: Payday -
Hiddos - 07.08.2010
pawn Код:
SetTimer("Payday", 60*1000, true);
return 1;
}
forward Payday();
public Payday()
{
new Payday;
for(new i; i < MAX_PLAYERS; i++) {
Payday = GivePlayerMoney(i, 1000);
SendClientMessage(i, COLOR_RED, "..:Payday:..");
SendClientMessage(i, COLOR_WHITE, "You have recieved $1000 in to your bank"
SendClientMessage(i, COLOR_RED, "Spend it wisley!");
}
return 1;
}
Re: Payday -
-Rebel Son- - 07.08.2010
First, make a new function.
Код:
foward payday();
public payday(){
for(new i; i < MAX_PLAYERS; i++) {
new Payday = GivePlayerMoney(i, 1000);
SendClientMessage(i,COLOR,"payday!");
}
}
then put at the top of your script.
then put this under OnGameModeInIt
Код:
paydaytimer = SetTimer("payday", 6000, 1);