- Sursa | Afiseaza codul
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <ColorChat> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent( "EventNewRoundStart", 2, "1=Round_Start" ); // Add your code here... } public EventNewRoundStart( ) { new iPlayers [ 32 ] , iNum, iNum2, iPlayers2 [ 32 ]; get_players ( iPlayers, iNum, "CT" ); get_players ( iPlayers2, iNum2, "TERRORIST" ); for ( new i = 0; i < iNum; i++ ) { CTCMD ( iPlayers [ i ] ); } for ( new k = 0; k < iNum2; k++ ) { TeroristCMD( iPlayers2 [ k ] ); } } public CTCMD ( id ) { new iplayers [ 32 ], count; get_players ( iplayers, count, "CT" ); if ( count ) { new id = iplayers [ random ( count ) ] //Mesaj new szName[ 32 ]; get_user_name(id, szName, 31 ); ColorChat(id, GREEN, "Felicitari %s din toti Teroristi tu ai fost ales sa salvezi lumea.", szName ); } } public TeroristCMD ( id ) { new iplayers2 [ 32 ] , count; get_players ( iplayers2, count, "TERRORIST" ); if ( count ) { new id = iplayers2 [ random ( count ) ] //Mesaj new szName[ 32 ]; get_user_name(id, szName, 31 ); ColorChat(id, GREEN, "Felicitari %s din toti Teroristi tu ai fost ales sa salvezi lumea.", szName ); } }
[Tutorial] Player random
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
- Truth*
- Scripter eXtreamCS
- Posts: 0
- Joined: 11 Oct 2013, 11:08
- Detinator Steam: Da
- SteamID: Ezeru
- Reputatie: Fost moderator ajutator
Membru Club eXtreamCS (4 luni)
Nume anterior: HyperioN.
Scripter eXtreamCS
0.2 / 3 - Fond eXtream: 0
- Location: Sibiu
- Has thanked: 44 times
- Been thanked: 122 times
Poftim incearca asa:
- Sursa | Afiseaza codul
P.S.: Netestat = Nu am avut timp să mă uit atent peste cod. Deci ceea ce am scris este posibil să fie greşit sau să aibă erori.
If i helped you and you wanna thank me, you can donate at this link : here
This will motivate me to help you in the future.
[If you want a private plugin send me a PM.(No complex plugins please, I am a student and I don't have the time to make those)]
If i helped you and you wanna thank me, you can donate at this link : here
This will motivate me to help you in the future.
[If you want a private plugin send me a PM.(No complex plugins please, I am a student and I don't have the time to make those)]
- Hades Ownage
- Membru, skill 0
- Posts: 0
- Joined: 22 Oct 2008, 10:12
- Detinator Steam: Da
- Detinator server CS: jb.clutch.ro
- SteamID: hades-source
- Reputatie: Fost Super Moderator
Fost Scripter eXtreamCS
Nume anterior: hadesownage - Location: Iasi
- Has thanked: 324 times
- Been thanked: 406 times
Codul lui @Cs_SURV!V0R este corect, deci va functiona. Al lui @adventx n-o sa mearga.
-
- Fost moderator
- Posts: 0
- Joined: 06 Jul 2013, 22:08
- Detinator Steam: Da
- Detinator server CS: Nu
- Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn - Has thanked: 492 times
- Been thanked: 547 times
Al lu' adventx e normal sa nu mearga fiindca el a folosit odata functia si nu poate sa ia 2 random deodata..