Author Topic:  Script generare automata meciuri v2  (Read 2403 times)

0 Members and 1 Guest are viewing this topic.

Offline IstuntmanI

  • GZS Owner
  • Administrator
  • Cyborg
  • *
  • Posts: 15119
  • Reputation: 80
  • Gender: Male
  • Real Name: NcF http://fb.me/cnistor96
  • Steam ID: istuntmani
Script generare automata meciuri v2
« on: 25 July 2014, 13:42:32 »
Acest script este a 2-a versiune a celui realizat la meciurile de FIFA (click pentru v1), acesta mi-a facut mie aranjarea mai usoara in post. Genereaza tabelul automat.

Code: [Select]
#include <a_samp>

#define IsOdd(%0) ( ( %0 ) & 1 )

enum geMatchesPlayers
{
gsUserLink[ 64 ],
gsUserName[ 32 ]
};

new gaMatchesPlayers[ ][ geMatchesPlayers ] =
{
{ "http://forum.skilledg.com/index.php?action=profile;u=1",    "![]stuntman[]!" },
{ "http://forum.skilledg.com/index.php?action=profile;u=1384", "LimiTLesS"      },
{ "http://forum.skilledg.com/index.php?action=profile;u=157",  "[uTD]Andrei"    },
{ "http://forum.skilledg.com/index.php?action=profile;u=155",  "obik._"         },
{ "http://forum.skilledg.com/index.php?action=profile;u=1379", "MefX"           },
{ "http://forum.skilledg.com/index.php?action=profile;u=1125", "xNick"          },
{ "http://forum.skilledg.com/index.php?action=profile;u=1845", "Christian"      },
{ "http://forum.skilledg.com/index.php?action=profile;u=1449", "Casper"         },
{ "http://forum.skilledg.com/index.php?action=profile;u=187",  "xXx_vasya_xXx"  },
{ "http://forum.skilledg.com/index.php?action=profile;u=1339", "[SG]K1d.xD"     },
{ "http://forum.skilledg.com/index.php?action=profile;u=2587", "Dj_Skull"       },
{ "http://forum.skilledg.com/index.php?action=profile;u=1299", "[uTD]P1xuletz"  },
{ "http://forum.skilledg.com/index.php?action=profile;u=245",  "Dudutz"         },
{ "http://forum.skilledg.com/index.php?action=profile;u=242",  "iPLAY"          },
{ "http://forum.skilledg.com/index.php?action=profile;u=220",  "BLooD"          },
{ "",                                                        "Nimeni"         }
};

new gaPlayerChosen[ sizeof gaMatchesPlayers ] = { -1, ... };

public OnFilterScriptInit( )
{
new liPlayersAmount = sizeof gaMatchesPlayers;
if( IsOdd( liPlayersAmount ) )
    return print( "EROARE: Numarul de jucatori trebuie sa fie par !" );

print( "[table]\n\
[tr][td][/td][td][color=red]#1[/color][/td][td][/td][td]vs[/td][td][/td][td][color=green]#2[/color][/td][td]Data disputare:[/td][/tr]" );

new liCount, liCountCounts;

for( new i = 0; i < sizeof gaMatchesPlayers; i ++ )
{
while( gaPlayerChosen[ i ] == -1 || gaPlayerChosen[ i ] == i )
{
    liCountCounts ++;

if( ( liCountCounts % 3 ) == 0 )
{
    liCount ++;
liCountCounts = 1;
}

gaPlayerChosen[ i ] = random( sizeof gaMatchesPlayers );
while( gaPlayerChosen[ gaPlayerChosen[ i ] ] != -1 )
{
gaPlayerChosen[ i ] = random( sizeof gaMatchesPlayers );
}

gaPlayerChosen[ gaPlayerChosen[ i ] ] = i;

if( !strlen( gaMatchesPlayers[ i ][ gsUserLink ] ) )
{
    printf( "[tr][td]%d[/td][td][color=red]%s[/color][/td][td]-[/td][td]vs[/td][td]-[/td][td][url=%s]%s[/url][/td][td]-[/td][/tr]",
    ( liCount + 1 ),
gaMatchesPlayers[ i ][ gsUserName ],
gaMatchesPlayers[ gaPlayerChosen[ i ] ][ gsUserLink ], gaMatchesPlayers[ gaPlayerChosen[ i ] ][ gsUserName ] );
}
else if( !strlen( gaMatchesPlayers[ gaPlayerChosen[ i ] ][ gsUserLink ] ) )
{
    printf( "[tr][td]%d[/td][td][url=%s]%s[/url][/td][td]-[/td][td]vs[/td][td]-[/td][td][color=red]%s[/color][/td][td]-[/td][/tr]",
    ( liCount + 1 ),
gaMatchesPlayers[ i ][ gsUserLink ], gaMatchesPlayers[ i ][ gsUserName ],
gaMatchesPlayers[ gaPlayerChosen[ i ] ][ gsUserName ] );
}
else
{
    printf( "[tr][td]%d[/td][td][url=%s]%s[/url][/td][td]-[/td][td]vs[/td][td]-[/td][td][url=%s]%s[/url][/td][td]-[/td][/tr]",
  ( liCount + 1 ),
gaMatchesPlayers[ i ][ gsUserLink ], gaMatchesPlayers[ i ][ gsUserName ],
gaMatchesPlayers[ gaPlayerChosen[ i ] ][ gsUserLink ], gaMatchesPlayers[ gaPlayerChosen[ i ] ][ gsUserName ] );
}
}
}

print( "[/table]" );
return 1;
}
(aranjarea este putin proasta din cauza aranjarii pe care o face forumul, in Pawno arata impecabil)

- Cum am facut ?
Dupa ce am pornit acest script, el mi-a printat in consola acele meciuri, iar eu le-am postat aici pe forum. Meciurile actuale le-am obtinut din PRIMA extragere la PRIMA testare corecta a scriptului.

- Printurile:
Code: [Select]
[25/07/2014 13:33:37] [table]
[tr][td][/td][td][color=red]#1[/color][/td][td][/td][td]vs[/td][td][/td][td][color=green]#2[/color][/td][td]Data disputare:[/td][/tr]
[25/07/2014 13:33:37] [tr][td]1[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=1]![]stuntman[]![/url][/td][td]-[/td][td]vs[/td][td]-[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=1339][SG]K1d.xD[/url][/td][td]-[/td][/tr]
[25/07/2014 13:33:37] [tr][td]1[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=1384]LimiTLesS[/url][/td][td]-[/td][td]vs[/td][td]-[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=242]iPLAY[/url][/td][td]-[/td][/tr]
[25/07/2014 13:33:37] [tr][td]2[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=157][uTD]Andrei[/url][/td][td]-[/td][td]vs[/td][td]-[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=155]obik._[/url][/td][td]-[/td][/tr]
[25/07/2014 13:33:37] [tr][td]2[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=1379]MefX[/url][/td][td]-[/td][td]vs[/td][td]-[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=1125]xNick[/url][/td][td]-[/td][/tr]
[25/07/2014 13:33:37] [tr][td]3[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=1845]Christian[/url][/td][td]-[/td][td]vs[/td][td]-[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=245]Dudutz[/url][/td][td]-[/td][/tr]
[25/07/2014 13:33:37] [tr][td]3[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=1449]Casper[/url][/td][td]-[/td][td]vs[/td][td]-[/td][td][color=red]Nimeni[/color][/td][td]-[/td][/tr]
[25/07/2014 13:33:37] [tr][td]4[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=187]xXx_vasya_xXx[/url][/td][td]-[/td][td]vs[/td][td]-[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=220]BLooD[/url][/td][td]-[/td][/tr]
[25/07/2014 13:33:37] [tr][td]4[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=2587]Dj_Skull[/url][/td][td]-[/td][td]vs[/td][td]-[/td][td][url=http://forum.skilledg.com/index.php?action=profile;u=1299][uTD]P1xuletz[/url][/td][td]-[/td][/tr]
[25/07/2014 13:33:37] [/table]
« Last Edit: 01 June 2015, 17:37:25 by ActiON_ »

Offline s l a m

  • T I T A N I U M
  • Legend
  • God
  • *
  • Posts: 8920
  • Reputation: 27
  • Gender: Male
  • T I T A N I U M
  • Steam ID: slamsg
Re: Script generare automata meciuri v2
« Reply #1 on: 25 July 2014, 13:56:34 »
tuti scripturile curului, nu inteleg nimic, doar inceputu' unde sunt includeurile si enum =))

Am picat bine, cred :))

P.S: Mefx - xNick, succes =)) ( ce bulan pe ei, si aici joaca amandoi :3 :)) )
« Last Edit: 25 July 2014, 13:59:26 by iP L A Y ツ »

· ,.-~*’¨¯¨’*·~-.¸-(_S L A M_)-,.-~*’¨¯¨’*·~-.¸

Legends never die





http://slam-official.tumblr.com/
http://www.youtube.com/user/DeepWyNN


FH3 - FH4 - FH5 player




· ,.-~*’¨¯¨’*·~-.¸-(_S L A M_)-,.-~*’¨¯¨’*·~-.¸


Offline ×X×_vasya_×X×

  • Legend
  • Cyborg
  • *
  • Posts: 10472
  • Reputation: 1
  • Gender: Male
  • Real Name: vasya
Re: Script generare automata meciuri v2
« Reply #2 on: 25 July 2014, 13:57:51 »
Bine lucrat . Bafta la toti participantii :) .


"Nu e obligatoriu să fii de acord cu mine. Dar ar fi mai rapid aşa."




Offline [SG]Andrei

  • High-Roller
  • *
  • Posts: 2752
  • Reputation: 0
  • Gender: Male
  • Fondator SkilledCrafting
Re: Script generare automata meciuri v2
« Reply #3 on: 25 July 2014, 14:01:11 »
Fenomenal am picat cu OBAMA ! Ba mereu pic cu cel mai bun X(

Offline [SG]P1xuletz.xD

  • A D D I C T E D.
  • Legend
  • God
  • *
  • Posts: 7254
  • Reputation: 0
  • Gender: Male
  • Todos los Torros.
Re: Script generare automata meciuri v2
« Reply #4 on: 25 July 2014, 15:03:17 »
GG ! am picat cu DJ_Skull :)) Fati testamentul prietene =))





Offline Badboy.UndeadArmy™

  • Skilled Gaming Legend
  • Legend
  • God
  • *
  • Posts: 9060
  • Reputation: 17
  • Gender: Male
  • Legends Never Die
  • Real Name: S.B.SZ.
  • Steam ID: badboyundeadarmy
Re: Script generare automata meciuri v2
« Reply #5 on: 25 July 2014, 15:12:00 »
Frumos script.Bine lucrat



Follow me on:
FaceBook
Instagram




Ai nevoie de ajutor? Trimite-mi un PM !
Do you need help? Send me a PM !

Offline oBaMa

  • do u evn #lift?
  • Spam Machine
  • *
  • Posts: 1009
  • Reputation: 0
  • 18 / 03 / 2009 - 13 / 11 / 2015
Re: Script generare automata meciuri v2
« Reply #6 on: 25 July 2014, 15:15:27 »
Fenomenal am picat cu OBAMA ! Ba mereu pic cu cel mai bun X(

18 / 03 / 2009 - 13 / 11 / 2015





Previously

ReaL SpeeD MusiC Administrator
ReaL SpeeD MusiC  Haze Corporation Founder
ReaLSpeeDMusiC  Los Santos Ballas Leader
Green Zone Stuntage The Bikers Leader
Green Zone Stuntage Los Santos Vagos Leader
Skilled Radio DJ
Skilled Gaming VIP
[close]



Offline Bogdan ✖️

  • Legend
  • High-Roller
  • *
  • Posts: 4312
  • Reputation: 0
  • Gender: Male
  • ZEW
  • Real Name: Bogdan
  • Steam ID: -
Re: Script generare automata meciuri v2
« Reply #7 on: 25 July 2014, 16:05:23 »
Exista hack pentru Haxball ?

Când vezi o afacere de succes înseamnă că cineva a luat o decizie curajoasă.

Offline IstuntmanI

  • GZS Owner
  • Administrator
  • Cyborg
  • *
  • Posts: 15119
  • Reputation: 80
  • Gender: Male
  • Real Name: NcF http://fb.me/cnistor96
  • Steam ID: istuntmani
Re: Script generare automata meciuri v2
« Reply #8 on: 25 July 2014, 16:13:40 »
Exista hack pentru Haxball ?
Nope, nu cred. Dar daca observati pe cineva puteti sa raportati, oricum nu cred ca va fi cazul.

Offline .shadoW

  • Berea fără alcool e ca și femeia fără țâțe.
  • Legend
  • High-Roller
  • *
  • Posts: 3449
  • Reputation: 12
  • Gender: Male
  • F O R D F O C U S
  • Real Name: S E B I
  • Steam ID: sh4d00W
Re: Script generare automata meciuri v2
« Reply #9 on: 25 July 2014, 16:18:32 »
P.S: Mefx - xNick, succes =)) ( ce bulan pe ei, si aici joaca amandoi :3 :)) )
I-am zis lui Flavius ma ar fi penal sa cad cu fratemio =)).

Puteam pune pariu :)).




Succes tuturor :D





Offline >.marKeLonn.<

  • ησтнιηg ιѕ ιηєνιтαвℓє
  • Legend
  • High-Roller
  • *
  • Posts: 2922
  • Reputation: 3
  • Gender: Male
  • SUCCES IS MY ONLY MOTHERF*CKING OPTION
  • Real Name: ^ M.J.Z ^ Angelo ^
Re: Script generare automata meciuri v2
« Reply #10 on: 25 July 2014, 16:24:54 »


Am picat bine, cred :))



Da , ai picat bine . xD
Stuntman e cyborg , la ce sa te astepti ? :)))
Succes tuturor .




" The world is going to judge you no matter what yo do , so live your life the f*cking way you want to " 


 

SimplePortal 2.3.7 © 2008-2024, SimplePortal