Lotto - Autostart
#1

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
Reply
#2

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
Reply
#3

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
Reply
#4

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
Reply
#5

Works !

Problem fixed thanks to


Skulls and Henry11200
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)