Jump to content
  • 0

pomoc loteria


Guest StReeY [Dinti]

Dotaz

16 odpovědí na tuto otázku

Recommended Posts

  • 0
Guest StReeY [Dinti]

no normal loteriu ze hraci daju napriklad /loteria a cislo a po piatých minutách sa vyberu tri čísla a ak hrác cislo uhadol tak vyhrava a to stale tak dokkolla cislo tak od 1 do 100 :rap:

 

//pomože mi niekto ? PLS

Link to comment
Share on other sites

  • 0

tu mas loto::::

#include

#include

 

new lotery[MAX_PLAYERS];

forward loteria(playerid);

 

stock PlayerName(playerid) {

new name[64];

GetPlayerName(playerid, name, 64);

return name;

}

 

dcmd_loto(playerid, params[])

{

new hodnota = strval(params), string[256];

if (!strlen(params)) return SendClientMessage(playerid, 0xAFAFAFAA, "[ Info ] Použitie: /loto [1-15]");

else if(hodnota > 16 || hodnota < 0) return SendClientMessage(playerid, 0xAFAFAFAA, "[LOTERIA] ZLA HODNOTA[1-15].");

else if(GetPlayerMoney(playerid) < 750) return SendClientMessage(playerid, 0xAFAFAFAA, "[LOTERIA] Nemas 750 dolarov.");

if(lotery[playerid] > 0) return SendClientMessage(playerid, 0xAFAFAFAA, "[LOTERIA] Uz si sa prihlasil do loterie.");

format(string, sizeof(string), "[LOTERIA] Zadal si cislo %d do loterie", hodnota);

GivePlayerMoney(playerid, -750); SendClientMessage(playerid, COLOR_YELLOW, string); lotery[playerid] = hodnota;

return true;

}

 

SetTimer("loteria",55000,1);//jedna sekunda je 1000/uprav si to ako ches

 

public loteria(playerid)

{

new string[256];

new cislo1 = random(15); new cislo2 = random(12); new cislo3 = random(9);

new vyhra = random(470000);

if(lotery[playerid] > 0)

{

if(lotery[playerid] == cislo1 || lotery[playerid] == cislo2 || lotery[playerid] == cislo3)

{

format(string, sizeof(string), "[LOTERIA] Hrac %s vyhral v loterii %d dolarov.", PlayerName(playerid), vyhra);

SendClientMessageToAll(COLOR_GREEN, string); GivePlayerMoney(playerid, vyhra); lotery[playerid] = -1;

}

}

if(lotery[playerid] > 0 && lotery[playerid] != cislo)

{

format(string, sizeof(string), "[LOTERIA] Tvoj tip %d nebol stastny.", lotery[playerid]);

SendClientMessage(playerid, COLOR_GREEN, string); lotery[playerid] = -1;

}

return 1;

}

 

dcmd(loto,4,cmdtext);

 

 

 

MAS NA VYBER TU MAS LOTERIU V PAWNE/////

Link to comment
Share on other sites

  • 0
tu mas loto::::

#include

#include

 

new lotery[MAX_PLAYERS];

forward loteria(playerid);

 

stock PlayerName(playerid) {

new name[64];

GetPlayerName(playerid, name, 64);

return name;

}

 

dcmd_loto(playerid, params[])

{

new hodnota = strval(params), string[256];

if (!strlen(params)) return SendClientMessage(playerid, 0xAFAFAFAA, "[ Info ] Použitie: /loto [1-15]");

else if(hodnota > 16 || hodnota < 0) return SendClientMessage(playerid, 0xAFAFAFAA, "[LOTERIA] ZLA HODNOTA[1-15].");

else if(GetPlayerMoney(playerid) < 750) return SendClientMessage(playerid, 0xAFAFAFAA, "[LOTERIA] Nemas 750 dolarov.");

if(lotery[playerid] > 0) return SendClientMessage(playerid, 0xAFAFAFAA, "[LOTERIA] Uz si sa prihlasil do loterie.");

format(string, sizeof(string), "[LOTERIA] Zadal si cislo %d do loterie", hodnota);

GivePlayerMoney(playerid, -750); SendClientMessage(playerid, COLOR_YELLOW, string); lotery[playerid] = hodnota;

return true;

}

 

SetTimer("loteria",55000,1);//jedna sekunda je 1000/uprav si to ako ches

 

public loteria(playerid)

{

new string[256];

new cislo = random(15); //i 15 je dost tato loteria ma dost velku nepravdepodobnost

new vyhra = random(450000);

if(lotery[playerid] > 0)

{

if(lotery[playerid] == cislo)

{

format(string, sizeof(string), "[LOTERIA] Hrac %s vyhral v loteri %d dolarov.", PlayerName(playerid), vyhra);

SendClientMessageToAll(COLOR_GREEN, string); GivePlayerMoney(playerid, vyhra); lotery[playerid] = 0;

}

}

if(lotery[playerid] > 0 && lotery[playerid] != cislo)

{

format(string, sizeof(string), "[LOTERIA] Tvoj tip %d nebol stastny.", lotery[playerid]);

SendClientMessage(playerid, COLOR_GREEN, string); lotery[playerid] = 0;

}

return 1;

}

 

dcmd(loto,4,cmdtext);

 

 

 

MAS NA VYBER TU MAS LOTERIU V PAWNE/////

Supr! Jede to ale měl jsem tam pár erroru ale už jsou pryč. Ted aby to jelo aj v modě a je to. Super TuT hodí se mi. :ugeek: Díky :thumbup:

Link to comment
Share on other sites

  • 0

nz robil som to pre svoj mod mam pre vas novinku>>>>

robim new includes >>>

1.MULTIINCLUDE SA VYRAZNE NEPODARILO>TOT INC VHODNE PRE ZACIATOCNIKOV{LOL}

2.MNOZSTVO INC KTORE POTOM UROBIM PRE FUNKCIE

Link to comment
Share on other sites

  • 0
nz robil som to pre svoj mod mam pre vas novinku>>>>

robim new includes >>>

1.MULTIINCLUDE SA VYRAZNE NEPODARILO>TOT INC VHODNE PRE ZACIATOCNIKOV{LOL}

2.MNOZSTVO INC KTORE POTOM UROBIM PRE FUNKCIE

Tak ty INC rozdej jen těm kterým věříš. Aspon něpujde zkopčit tvuj mod ;) můžeš dát na net i PWN to budou překvapení :d

Link to comment
Share on other sites

  • 0

moja loteria>>>>

new lotery[MAX_PLAYERS] = -1;

forward loteria(playerid);

SetTimer("loteria",120000,1);

 

dcmd_loto(playerid, params[])

{

new hodnota = strval(params), string[256];

if (!strlen(params)) return SendClientMessage(playerid, 0xAFAFAFAA, "[ Info ] Použitie: /loto [0-100]");

else if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, 0xAFAFAFAA, "[LOTERIA] Nemas 1500 dolarov.");

else if(lotery[playerid] > 101 || lotery[playerid] > -1) return SendClientMessage(playerid, 0xAFAFAFAA, "[LOTERIA] Uz si sa prihlasil do loterie.");

else if(hodnota > 101 || hodnota < -1) return SendClientMessage(playerid, 0xAFAFAFAA, "[LOTERIA] ZLA HODNOTA[0-100].");

format(string, sizeof(string), "[LOTERIA] Zadal si cislo %d do loterie", hodnota);

GivePlayerMoney(playerid, -1500); SendClientMessage(playerid, COLOR_YELLOW, string); lotery[playerid] = hodnota;

return true;

}

 

public loteria(playerid)

{

new string[256];

new cislo1 = random(100); new cislo2 = random(75); new cislo3 = random(50); new cislo4 = random(25);

new vyhra = random(1000000);

if(lotery[playerid] > 0)

{

if(lotery[playerid] == cislo1 || lotery[playerid] == cislo2 || lotery[playerid] == cislo3 || lotery[playerid] == cislo4)

{

format(string, sizeof(string), "[LOTERIA] Hrac %s vyhral v loterii %d dolarov.", PlayerName(playerid), vyhra);

SendClientMessageToAll(COLOR_GREEN, string); GivePlayerMoney(playerid, vyhra); lotery[playerid] = -1;

}

}

if(lotery[playerid] > 0 && lotery[playerid] != cislo1) { format(string, sizeof(string), "[LOTERIA] Tvoj tip %d nebol stastny.", lotery[playerid]); SendClientMessage(playerid, COLOR_GREEN, string); lotery[playerid] = -1; }

if(lotery[playerid] > 0 && lotery[playerid] != cislo2) { format(string, sizeof(string), "[LOTERIA] Tvoj tip %d nebol stastny.", lotery[playerid]); SendClientMessage(playerid, COLOR_GREEN, string); lotery[playerid] = -1; }

if(lotery[playerid] > 0 && lotery[playerid] != cislo3) { format(string, sizeof(string), "[LOTERIA] Tvoj tip %d nebol stastny.", lotery[playerid]); SendClientMessage(playerid, COLOR_GREEN, string); lotery[playerid] = -1; }

if(lotery[playerid] > 0 && lotery[playerid] != cislo4) { format(string, sizeof(string), "[LOTERIA] Tvoj tip %d nebol stastny.", lotery[playerid]); SendClientMessage(playerid, COLOR_GREEN, string); lotery[playerid] = -1; }

return 1;

}

 

dcmd(loto,4,cmdtext);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...