SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 02/01/2010, 07:57 PM   #1
ArTisT
Big Clucker
 
Join Date: Mar 2009
Posts: 99
Reputation: 0
Default Lotto - Autostart

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
ArTisT is offline  
Old 02/01/2010, 08:17 PM   #2
Henry11200
Little Clucker
 
Join Date: Mar 2009
Posts: 14
Reputation: 0
Default Re: Lotto - Autostart

pawn Code:
#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
Henry11200 is offline  
Old 02/01/2010, 08:25 PM   #3
ArTisT
Big Clucker
 
Join Date: Mar 2009
Posts: 99
Reputation: 0
Default Re: Lotto - Autostart

thanks for help

but i get this errors


Code:
: 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
ArTisT is offline  
Old 02/01/2010, 08:26 PM   #4
Hijolion
Huge Clucker
 
Hijolion's Avatar
 
Join Date: Dec 2009
Location: United States
Posts: 256
Reputation: 5
Default Re: Lotto - Autostart

Quote:
Originally Posted by ArTisT
thanks for help

but i get this errors


Code:
: 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
Hijolion is offline  
Old 02/01/2010, 08:36 PM   #5
ArTisT
Big Clucker
 
Join Date: Mar 2009
Posts: 99
Reputation: 0
Default Re: Lotto - Autostart

Works !

Problem fixed thanks to


Skulls and Henry11200
ArTisT is offline  
Old 21/08/2010, 04:52 PM   #6
Elviss
Big Clucker
 
Elviss's Avatar
 
Join Date: Aug 2010
Posts: 88
Reputation: 0
Default Re: Lotto - Autostart

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 (c) 1997-2006, ITB CompuPhase


5 Errors.
HELP ME PLEASE
Elviss is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] Lotto 6/49 Zezombia Filterscripts 37 09/05/2012 08:15 PM
[FilterScript] [FS] Lotto Clavius Filterscripts 17 09/12/2011 03:14 PM
Lotto Script Ownzer Help Archive 13 16/07/2009 02:58 AM
help with lotto text... lukica Help Archive 1 01/03/2009 05:39 PM


All times are GMT. The time now is 05:09 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.