Lotto - Autostart - 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: Lotto - Autostart (
/showthread.php?tid=118023)
Lotto - Autostart -
ArTisT - 02.01.2010
Quote:
if(strcmp(cmd, "/startlotto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
format(string, sizeof(string), "Lottery News: We have started the Lottery Election.");
OOCOff(COLOR_DBLUE, string);
new rand = random(80);
if(rand < 77) { rand += 3; }
Lotto(rand);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not an Admin !");
return 1;
}
}
return 1;
}
|
I want that the lotto starts auto with a timer can someonen give me a code pls... Thanks
Re: Lotto - Autostart -
Henry11200 - 02.01.2010
pawn Код:
#define INTERVAL 360000
forward LottoStart();
//ONGAMEMODEINIT
SetTimer("LottoStart",INTERVAL,true);
//Public Function
public LottoStart(){
format(string, sizeof(string), "Lottery News: We have started the Lottery Election.");
OOCOff(COLOR_DBLUE, string);
new rand = random(80);
f(rand < 77) rand += 3;
Lotto(rand);
}
No need for admin stuff i think :P
Re: Lotto - Autostart -
ArTisT - 02.01.2010
thanks for help
but i get this errors
Код:
: error 017: undefined symbol "string"
: error 017: undefined symbol "string"
: error 029: invalid expression, assumed zero
: fatal error 107: too many error messages on one line
Re: Lotto - Autostart -
Hijolion - 02.01.2010
Quote:
Originally Posted by ArTisT
thanks for help
but i get this errors
Код:
: error 017: undefined symbol "string"
: error 017: undefined symbol "string"
: error 029: invalid expression, assumed zero
: fatal error 107: too many error messages on one line
|
add new string[128]; above
Re: Lotto - Autostart -
ArTisT - 02.01.2010
Works !
Problem fixed thanks to
Skulls and Henry11200
Re: Lotto - Autostart -
Elviss - 21.08.2010
C:\Users\Elvis\Desktop\Server\GTARP\gamemodes\gtar p.pwn(3274) : error 021: symbol already defined: "SetTimer"
C:\Users\Elvis\Desktop\Server\GTARP\gamemodes\gtar p.pwn(3277) : error 017: undefined symbol "string"
C:\Users\Elvis\Desktop\Server\GTARP\gamemodes\gtar p.pwn(3277) : error 017: undefined symbol "string"
C:\Users\Elvis\Desktop\Server\GTARP\gamemodes\gtar p.pwn(3277) : error 029: invalid expression, assumed zero
C:\Users\Elvis\Desktop\Server\GTARP\gamemodes\gtar p.pwn(3277) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
HELP ME PLEASE