SA-MP Forums Archive
[FilterScript] Hwang's Lotto System. - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Hwang's Lotto System. (/showthread.php?tid=462414)



Hwang's Lotto System. - Hwang - 06.09.2013

Hi, my server was using the lottery system did, and after making a few edits have decided to share, let the system health edit the line in the system 114. Put your server, use at your leisure, the players remain satisfied, players health use number between 1 and 50, because number is between 1 to 50, the winner's life armor (100hp) and +20 score is $ 90,000. Do not get confused because he created a stock lottoprizes, he can change Stock looking at the awards.

Hwang's Lotto System Click To Download!


Re: Hwang's Lotto System. - ruddeTR - 06.09.2013

Pastebin link add please


Re: Hwang's Lotto System. - Hwang - 06.09.2013

Код:
/*

»»»»»»»»          						    Yapımcı 	=;
             													  		   Hwang

»»»»»»»»                                    Tarih	    =;
 																      07.09.2013

*/

#include	a_samp
#pragma     tabsize		0
#define 	dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

new LotoBitti,
		LotoBasladi,
			LotoNumarasi,
				LotoBasladiVOL2;

public OnFilterScriptInit(){
InitInfos();
return 1;}

public OnFilterScriptExit(){
ExitInfos();
return 1;}

public OnPlayerCommandText(playerid, cmdtext[]){
dcmd(lotto,5,cmdtext);
return 1;}

dcmd_lotto(playerid,params[]){
if(LotoBasladiVOL2 == 1){
new tmp[256];
if(!strlen(params)) return SendClientMessage(playerid,-1,"{00FFFF}+- Loto -+ {ffffff}/lotto [Number]");
if(IsNumeric(tmp)){
new 			lCevabi;
lCevabi 	= 	strval(params);
if(lCevabi == LotoNumarasi){
LotoBasladiVOL2 = 0;
LotoNumarasi = 0;
KillTimer(LotoBitti);
LotoBasladi = SetTimer("LotoBasladiVOL0", 300000, 0);
lotteryprizes(playerid);
new isim[MAX_PLAYER_NAME];
GetPlayerName(playerid,isim, sizeof(isim));
new str[128];
format(str,128,"{00FFFF}+- Lotto -+ {00FF00}%s {ffffff}has won the lottery player 90.000$ and +20 score win!",isim);
SendClientMessageToAll(-1,str);
}else{
SendClientMessage(playerid,-1,"{00FFFF}+- Lotto -+ {ffffff}You incorrectly answered.");
}
}
else
{
return SendClientMessage(playerid,-1,"{00FFFF}+- Lotto -+ {ffffff}Is not active!");
}
return 1;
}
}

forward LotoBasladiVOL0();
public LotoBasladiVOL0(){
LotoNumarasi = random(50);
LotoBasladiVOL2 = 1;
new LotoyaZi[128];
new LotoyaZi2[128];
format(LotoyaZi, sizeof(LotoyaZi), "{00FFFF}+- Lotto -+ {ffffff}Lotto started lotto /lotto number between 1-50 to play using the lottery!");
SendClientMessageToAll(-1, LotoyaZi);
LotoBitti = SetTimer("LotoSonaErdi", 120000, 0);
return 1;}

forward LotoSonaErdi();
public LotoSonaErdi(){
new LotoyaZi[128];
new LotoyaZi2[128];
LotoBasladiVOL2 = 0;
format(LotoyaZi, sizeof(LotoyaZi), "{00FFFF}+- Lotto -+ {ffffff}No one failed to meet the lottery, lotto, whereas numerous as follows: {00FFFF}%d",LotoNumarasi);
SendClientMessageToAll(-1, LotoyaZi);
LotoBasladi = SetTimer("LotoBasladiVOL0", 300000, 0);
return 1;}

stock IsNumeric(string[])
{
	for (new i = 0, j = strlen(string);
	i < j; i++)
	{
	if (string[i] > '9' || string[i] < '0')
	return 0;
	}
	return 1;
}

stock lotteryprizes(playerid){
SetPlayerScore(playerid,GetPlayerScore(playerid)+20);
GivePlayerMoney(playerid,90000);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GameTextForPlayer(playerid, "you lotto winner!", 1000, 3);
return 1;}

stock InitInfos(){
print("@@@@@@@  Lotto System Settings Installed!  @@@@@@@\n");
print("			Author:					Hwang\n");
print("			Create Date:			07.09.2013\n");
print("			System Active			 !			\n");
LotoBasladi = SetTimer("LotoBasladiVOL0", 300000, 0);
LotoBasladiVOL2 = 0;
return 1;}

stock ExitInfos(){
print("@@@@@@ 	Lotto System Info 	@@@@@@@\n");
print("			==>> System Closed !!!");
return 1;}



Respuesta: Hwang's Lotto System. - Swedky - 06.09.2013

Stop flooding! ¬¬

Screens?



Re: Respuesta: Hwang's Lotto System. - Hwang - 06.09.2013

Quote:
Originally Posted by EnzoMetlc
Посмотреть сообщение
Stop flooding! ¬¬

Screens?
I did not need the picture, everything in the middle.


Re: Hwang's Lotto System. - Hwang - 23.11.2013

Updated!