As dori si eu un plugin care sa îţi regenereze 6 numere aleatorie din 49
sa scrii /lotto si sa îţi apara in chat cele 6 numere
si fiecare tastare a comenzi sa coste 5000$
Mulţumesc...
Cerere plugin lotto 6/49
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
Forum rules
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Accesează link-ul pentru a putea vedea regulile forumului
Daca doriti sa vi se modifice un plugin, va rugam postati aici .
-
- Membru eXtream
- Posts: 3193
- Joined: 30 Aug 2012, 22:16
- Detinator Steam: Da
- CS Status: Fost scripter
- Detinator server CS: Nu
- SteamID: -
- Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff - Location: Bucuresti
- Has thanked: 342 times
- Been thanked: 571 times
- Contact:
Ce greu era :-@teNNeke. wrote:Il am eu, doar contracost.
Code: Select all
#include < amxmodx >
#include < cstrike >
#define PLUGIN_NAME "Lotto"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "cruyff"
new g_Number[ 8 ];
public plugin_init( )
{
register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );
register_clcmd( "say /lotto", "Func_Lotto" );
}
public Func_Lotto( id )
{
if( cs_get_user_money( id ) < 5000 )
{
client_print( 0, print_chat, "Nu ai destui bani." );
}
else
{
client_print( 0, print_chat, "Cele 6 numere extrase la lotto:^n" );
for( new i = 1; i < 6; i++ )
{
g_Number[ i ] = random_num( 0, 49 );
client_print( 0, print_chat, "%i: %i", i, g_Number[ i ] );
cs_set_user_money( id, cs_get_user_money( id ) - 5000 );
}
}
}
Retras
-
- Membru, skill +1
- Posts: 318
- Joined: 01 Sep 2013, 17:59
- Detinator Steam: Nu
- CS Status: Citesc forumul eXtreamCS.com...!
- Has thanked: 36 times
- Been thanked: 9 times
- Contact:
Nu e complet, ceea ce am eu privat are 8kb.cruyff wrote:Ce greu era :-@teNNeke. wrote:Il am eu, doar contracost.Code: Select all
#include < amxmodx > #include < cstrike > #define PLUGIN_NAME "Lotto" #define PLUGIN_VERSION "1.0" #define PLUGIN_AUTHOR "cruyff" new g_Number[ 8 ]; public plugin_init( ) { register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR ); register_clcmd( "say /lotto", "Func_Lotto" ); } public Func_Lotto( id ) { if( cs_get_user_money( id ) < 5000 ) { client_print( 0, print_chat, "Nu ai destui bani." ); } else { client_print( 0, print_chat, "Cele 6 numere extrase la lotto:^n" ); for( new i = 1; i < 6; i++ ) { g_Number[ i ] = random_num( 0, 49 ); client_print( 0, print_chat, "%i: %i", i, g_Number[ i ] ); cs_set_user_money( id, cs_get_user_money( id ) - 5000 ); } } }
Last edited by munir on 24 Dec 2013, 21:45, edited 1 time in total.
Reason: Ce a cerut el, ce-i dai tu.
Reason: Ce a cerut el, ce-i dai tu.
- cyby
- Scripter eXtreamCS
- Posts: 1777
- Joined: 16 Jul 2011, 21:46
- Detinator Steam: Da
- Detinator server CS: Da
- Reputatie: Scripter eXtreamCS
Fost Moderator ajutator - Has thanked: 146 times
- Been thanked: 396 times
Gresit total.cruyff wrote:Ce greu era :-@teNNeke. wrote:Il am eu, doar contracost.Code: Select all
#include < amxmodx > #include < cstrike > #define PLUGIN_NAME "Lotto" #define PLUGIN_VERSION "1.0" #define PLUGIN_AUTHOR "cruyff" new g_Number[ 8 ]; public plugin_init( ) { register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR ); register_clcmd( "say /lotto", "Func_Lotto" ); } public Func_Lotto( id ) { if( cs_get_user_money( id ) < 5000 ) { client_print( 0, print_chat, "Nu ai destui bani." ); } else { client_print( 0, print_chat, "Cele 6 numere extrase la lotto:^n" ); for( new i = 1; i < 6; i++ ) { g_Number[ i ] = random_num( 0, 49 ); client_print( 0, print_chat, "%i: %i", i, g_Number[ i ] ); cs_set_user_money( id, cs_get_user_money( id ) - 5000 ); } } }
93.114.82.17:27015 - Monster Invasion CO-OP Mod
-
- Membru eXtream
- Posts: 3193
- Joined: 30 Aug 2012, 22:16
- Detinator Steam: Da
- CS Status: Fost scripter
- Detinator server CS: Nu
- SteamID: -
- Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff - Location: Bucuresti
- Has thanked: 342 times
- Been thanked: 571 times
- Contact:
Eu vad ca functioneazacyby wrote:Gresit total.cruyff wrote:Ce greu era :-@teNNeke. wrote:Il am eu, doar contracost.Code: Select all
#include < amxmodx > #include < cstrike > #define PLUGIN_NAME "Lotto" #define PLUGIN_VERSION "1.0" #define PLUGIN_AUTHOR "cruyff" new g_Number[ 8 ]; public plugin_init( ) { register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR ); register_clcmd( "say /lotto", "Func_Lotto" ); } public Func_Lotto( id ) { if( cs_get_user_money( id ) < 5000 ) { client_print( 0, print_chat, "Nu ai destui bani." ); } else { client_print( 0, print_chat, "Cele 6 numere extrase la lotto:^n" ); for( new i = 1; i < 6; i++ ) { g_Number[ i ] = random_num( 0, 49 ); client_print( 0, print_chat, "%i: %i", i, g_Number[ i ] ); cs_set_user_money( id, cs_get_user_money( id ) - 5000 ); } } }
Code: Select all
1: 3
2: 33
3: 45
4: 4
VAC secure mode disabled.
Retras
- cyby
- Scripter eXtreamCS
- Posts: 1777
- Joined: 16 Jul 2011, 21:46
- Detinator Steam: Da
- Detinator server CS: Da
- Reputatie: Scripter eXtreamCS
Fost Moderator ajutator - Has thanked: 146 times
- Been thanked: 396 times
Iar gresit.
Iti ia de prea multe ori banii in primul rand ca ai introdus luarea banilor in for si numerele la loto nu sunt repetative, a ales unu nu mai poate fi acelasi.
Iti ia de prea multe ori banii in primul rand ca ai introdus luarea banilor in for si numerele la loto nu sunt repetative, a ales unu nu mai poate fi acelasi.
93.114.82.17:27015 - Monster Invasion CO-OP Mod
-
- Membru eXtream
- Posts: 3193
- Joined: 30 Aug 2012, 22:16
- Detinator Steam: Da
- CS Status: Fost scripter
- Detinator server CS: Nu
- SteamID: -
- Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff - Location: Bucuresti
- Has thanked: 342 times
- Been thanked: 571 times
- Contact:
Greseala mea. Aseara cand l-am facut eram prea obosit ca sa-mi dau seama de greseli. (venisem de la munca.)
Retras