[Pomoc] oko pogodi broj plugina
Results 1 to 5 of 5
  1. #1
    Member Array
    Join Date
    Dec 2012
    Karma
    5

    Default oko pogodi broj plugina

    Ne radi /kviz i ne mozes dati odgovore a sve ostalo ispisuje. Citao sam po forumima da je to valjda do prefixa. Sta trebam jos zamenit? Hvala unapred.

  2. #2
    Super Moderator Array klipica's Avatar
    Join Date
    Apr 2010
    Location
    lk-net.com
    Karma
    26

    Default

    Pre svega postavis link do plugina ili kod plugina, da znamo o kojem se radi.
    Takodje, dobro bi doslo da ukucas ove komande u server konzolu i kopiras ovde sta ti izbace:
    Code:
    meta list
    amxx list
    amxx modules
    Code:
    #YoMama {
        width: 200%;
        overflow: visible;
    }

  3. #3
    Moderator Array Rade.kgb's Avatar
    Join Date
    Jul 2012
    Location
    www.gamers.rs
    Karma
    6

    Default

    Mozda nisi lepo instalirao plugin. Postavi kod I link plugina pa cemo videti.

  4. #4
    Member Array
    Join Date
    Dec 2012
    Karma
    5

    Default

    Video sam na jednom forumu da pise da je do moda da je prefix lose odradjen.
    Koristim ovaj mod https://forum.kgb-hosting.com/showthread.php?t=69082
    Code:
    /*   	Kviz Pogodi Broj v1.0  2012, ->UrOS<-
    	Contact e-mail urosh@in.com
    	
    	Formatright
        
    	*English*
    	This plugin is free software;
    	you can modify it under the terms of the
    	GNU General Public License as published by the Free Software Foundation.
        
    	*Serbian* 
    	Ovaj plugin je besplatni program;
    	mozete ga menjati postujuci prava autora, samo ga ne smete prodavati.
        
    */
    
    #include <amxmodx>
    #include <amxmisc>
    #include <colorchat>
    #include <nvault>
    #include <cstrike>
    
    #define PLUGIN "Kviz Pogodi Broj"
    #define VERSION "1.0"
    #define AUTHOR "->UrOS<-"
    
    new resenje = 0
    new bool:kviz = false
    new pokusaji[33]
    new rank[33]
    new meni[33]
    new vreme
    new ucestalost
    new nagrada
    new opseg
    
    public plugin_init() 
    {
    	register_plugin(PLUGIN, VERSION, AUTHOR)
    	register_cvar("pogodibroj", VERSION, (FCVAR_SERVER|FCVAR_SPONLY))
    	
    	register_concmd("say", "provera")
    	register_concmd("say_team", "provera")
    	
    	register_clcmd("say /kviz","prikazimenu")
    	register_clcmd("say_team /kviz","prikazimenu")
    	
    	register_clcmd("say /kviztop15","prikazitop15")
    	register_clcmd("say_team /kviztop15","prikazitop15")
    	
    	register_clcmd("say /kvizrank","prikazirank")
    	register_clcmd("say_team /kvizrank","prikazirank")
    	
    	vreme = register_cvar("pogodibroj_vreme", "60", ADMIN_RCON)
    	ucestalost = register_cvar("pogodibroj_ucestalost", "90", ADMIN_RCON)
    	nagrada = register_cvar("pogodibroj_nagrada", "16000", ADMIN_RCON)
    	opseg = register_cvar("pogodibroj_opseg", "500", ADMIN_RCON)
    	
    	set_task(get_pcvar_float(ucestalost),"generisi")
    }
    
    public plugin_precache()
    {
    	precache_sound("ambience/lv2.wav")
    	precache_sound("buttons/bell1.wav")
    	precache_sound("vox/bravo.wav")
    }
    
    public client_putinserver(id)
    {
    	set_task(15.0, "reklama", id, _, _, "a", 1) 
    	rank[id] = ucitajrank(id)
    }
    
    public generisi()
    {
    	resenje = random_num(1,get_pcvar_num(opseg))
    	kviz = true
    	set_hudmessage(85, 170, 255, 0.02, 0.65, 0, 6.0, 10.0)
    	show_hudmessage(0, "[Kviz] Pogodi trazeni broj izmedju 1 i %d",get_pcvar_num(opseg))
    	ColorChat(0, TEAM_COLOR, "^4[Kviz] ^1Pogodi trazeni broj izmedju^4 1 ^1i^4 %d",get_pcvar_num(opseg))
    	client_cmd(0, "speak ambience/lv2.wav")
    	set_task(get_pcvar_float(vreme),"vremeisteklo")
    	for(new id=0;id<33;id++)
    		pokusaji[id]=0
    }
    
    public vremeisteklo()
    {
    	if(kviz)
    	{
    		kviz = false
    		ColorChat(0, TEAM_COLOR, "^4[Kviz] ^1Vreme je isteklo, trazeni broj je bio ^3%d",resenje)
    		client_cmd(0, "speak buttons/bell1.wav")
    	}
    	set_task(get_pcvar_float(ucestalost),"generisi")
    }
    
    public provera(id)
    {
    	if(kviz)
    	{
    		new text[32]
    		read_argv(1,text,31)
    		new odgovor = str_to_num(text)	
    		
    		if(odgovor==0 && (resenje != 0 || text[ 0 ] != '0'))
    			return
    
    		pokusaji[id]++
    		
    		if(odgovor>get_pcvar_num(opseg))
    		{
    			ColorChat(id, TEAM_COLOR, "^4[Kviz] ^1Trazi se samo broj izmedju^4 1 ^1i^4 %d",get_pcvar_num(opseg))
    		}
    		else if(resenje>odgovor)
    		{
    			ColorChat(id, TEAM_COLOR, "^4[Kviz] ^1Trazeni broj je ^3VECI ^1od unetog broja^3 %d",odgovor)
    		}
    		else if(resenje<odgovor)
    		{
    			ColorChat(id, TEAM_COLOR, "^4[Kviz] ^1Trazeni broj je ^4MANJI ^1od unetog broja^4 %d",odgovor)
    		}
    		else if(odgovor==resenje)
    		{
    			kviz = false
    			new ime[32]
    			get_user_name(id, ime, 31)
    			cs_set_user_money(id,get_pcvar_num(nagrada)/pokusaji[id]+cs_get_user_money(id))
    			rank[id] += 1
    			sacuvajrank(id, rank[id])
    			ColorChat(0, TEAM_COLOR, "^4[Kviz]^3 %s ^1je prvi pogodio trazeni broj^4 %d ^1sa^3 %d ^1pokusaja, nagrada^4 %d$",ime,resenje,pokusaji[id],get_pcvar_num(nagrada)/pokusaji[id])
    			client_cmd(0, "speak buttons/bell1.wav")
    			{
    				client_cmd(id, "speak vox/bravo.wav")
    				ColorChat(id, TEAM_COLOR, "^4[Kviz] ^1Cestitamo pogodili ste trazeni broj^4 %d ^1sa^3 %d ^1pokusaja, osvajate^4 %d$",resenje,pokusaji[id],get_pcvar_num(nagrada)/pokusaji[id])
    			}
    		}
    	}
    }
    
    public ucitajrank( id ) 
    {
    	new valut = nvault_open("kviz")
    	
    	new authid[33]
    	new vaultkey[64], vaultdata[64]
    	
    	get_user_authid(id, authid, 32)
    	
    	format(vaultkey, 63, "_%s_BODOVI_", authid)
    	
    	nvault_get(valut, vaultkey, vaultdata, 63)
    	nvault_close(valut)
    	
    	return str_to_num(vaultdata)
    }
    
    public sacuvajrank(id, bodovi)
    {
    	new valut = nvault_open("kviz")
    	
    	if(valut == INVALID_HANDLE)
    		set_fail_state("Greska nValut kviz (invalid handle)")
    	
    	new authid[32]
    	new vaultkey[64], vaultdata[64]
    	
    	get_user_authid(id, authid, 31)
    	
    	format(vaultkey, 63, "_%s_BODOVI_", authid)
    	format(vaultdata, 63, "%d^n", bodovi)
    	
    	nvault_set(valut, vaultkey, vaultdata)
    	nvault_close(valut)
    }
    
    public prikazirank(id) 
    	ColorChat(id, TEAM_COLOR,"^4[Kviz] ^1Pogodili ste trazeni broj ^4%d ^1puta", rank[id])
    
    public prikazitop15(id)
    {
    	new i, count, name[98]
    	static sort[34][2]
    	
    	
     	for(i=0;i<33;i++)
    	{
    		sort[count][0] = i
    		sort[count][1] = rank[i]
    		count++
    	}
    	
    	SortCustom2D(sort,count,"stats")	
    	
    	new buffer[2048] 
    	new line[256]	 
    	
    	new len = format( buffer, 2047, "<body bgcolor=#000000 style=^"color:#ffffff^"><pre><Center><img src=^"http://img62.imageshack.us/img62/2709/kvizzz.gif^"><table width=100%% cellpadding=1 cellspacing=1 border=0>")         
    	len += format( buffer[len], 2047-len, "<tr style=^"color:#8FABFF^"><th width=5%%>#<th width=60%%>Nick<th width=35%%>Broj pogodaka")  
    	
    	new players[32], num
    	get_players(players, num)
    	
    	new b = clamp(count,0,15)
    	
    	for(new a = 0; a < b; a++)
    	{		
    		get_user_name(sort[a][0], name, 97)
    		
    		while (containi(name, "<") != -1)
    			replace(name, 96, "<", "&lt;")
    		while (containi(name, ">") != -1)
    			replace(name, 96, ">", "&gt;")
    			
    		//if(sort[a][1] != 0) // ako ima 0 bodova ne prikazuje ga u listi
    		{	
    			format(line, 255, "<tr %s><td>%d<td style=^"color:%s^">%s<td>%d", ((a%2)==0) ? " bgcolor=#333333" : " bgcolor=#262626", a+1,((a%2)==0) ? "#9CFF7A" : "red", name, sort[a][1])   
    			len += format( buffer[len], 2047-len, line )
    		}
    	}
    	format(line, 255, "</table><font color=^"red^">(Statistika trenutno pristutnih igrača)</body></pre>" )
    	len += format( buffer[len], 2047-len, line )
    	show_motd(id, buffer, "Kviz - Top 15")
    	
    	return PLUGIN_CONTINUE
    }
    
    public stats(elem1[],elem2[])
    {
    	if(elem1[1] > elem2[1]) return -1
    	else if(elem1[1] < elem2[1]) return 1
    		
    	return 0
    }
    
    public prikazimotd(id)
    {	
    	static motd[1501], len
    	
    	len = format(motd, 1500,"<body bgcolor=#000000><font color=#87cefa><pre>")
    	len += format(motd[len], 1500-len,"<center><img src=^"http://img62.imageshack.us/img62/2709/kvizzz.gif^"></center></img>")
    	len += format(motd[len], 1500-len,"<center><h4><font color=^"red^"><B>%s - Verzija %s</B> </font></h4></center>", PLUGIN, VERSION)
    	len += format(motd[len], 1500-len,"<center><h4><font color=^"blue^"><B>Plugin napravio %s</B> </font></h4></center>", AUTHOR)
    	len += format(motd[len], 1500-len,"<center><h4><font color=^"white^"><B>Kontakt e-mail urosh@in.com</B> </font></h4></center>")
    	len += format(motd[len], 1500-len,"<center><font color=^"white^"> </font></center>")	
    	len += format(motd[len], 1500-len,"<center><h4><font color=^"red^"><B>-----------------------</B> </font></h4></center>")
    	len += format(motd[len], 1500-len,"<center><font color=^"white^">Za sva pitanja i informacije</font></center>")
    	len += format(motd[len], 1500-len,"<center><font color=^"white^">pisite na gore navdeni e-mail</font></center>")	
    	len += format(motd[len], 1500-len,"<center><h4><font color=^"red^"><B>-----------------------</B> </font></h4></center>")	
    	
    	show_motd(id, motd, "Kviz - Informacije")
    	
    	return 0
    }
    
    public prikazimenu(id)
    {
    	formatex( meni, charsmax( meni ), "\rKviz Pogodi Broj \yv1.0")
    	new menu = menu_create( meni, "menuakcija")
    	
    	formatex( meni, charsmax( meni ), "\d Vidi Rank")
    	menu_additem( menu, meni, "0")
    	
    	formatex( meni, charsmax( meni ), "\d Vidi Top15")
    	menu_additem( menu, meni, "1")
    	
    	formatex( meni, charsmax( meni ), "\d Informacije o pluginu")
    	menu_additem( menu, meni, "2" )
    
    	menu_display( id, menu )
    }
    
    public menuakcija( id, menu, item )
    {
    	if( item >= 0 ) 
    	{
    	new access, callback, actionString[ 2 ]		
    	menu_item_getinfo( menu, item, access, actionString, charsmax( actionString ), _, _, callback )		
    		
    	new action = str_to_num( actionString )
    	{
    		switch( action )
    			{
    			case 0:
    				{
    					prikazirank(id)
    					set_task(0.1, "prikazimenu", id, _, _, "a", 1)
    				}
    			case 1:
    				{
    					prikazitop15(id) 
    					set_task(0.1, "prikazimenu", id, _, _, "a", 1)				
    				}
    			case 2:
    				{
    					prikazimotd(id)
    					set_task(0.1, "prikazimenu", id, _, _, "a", 1)				
    				}	
    			}
    		}	
    	}   
    	menu_destroy( menu )
    	return PLUGIN_HANDLED
    }
    
    public reklama(id)
    {	
    	if(is_user_connected(id))
    	{
    		ColorChat(id, TEAM_COLOR, "^4[Kviz] ^1Ovaj server koristi ^3%s v%s ^1za informacije o pluginu ^3say /kviz", PLUGIN, VERSION)	
    		set_task(600.0, "reklama", id, _, _, "a", 1) 
    	}
    }

  5. #5
    Super Moderator Array klipica's Avatar
    Join Date
    Apr 2010
    Location
    lk-net.com
    Karma
    26

    Default

    Da ponovim:
    Quote Originally Posted by klipica View Post
    Takodje, dobro bi doslo da ukucas ove komande u server konzolu i kopiras ovde sta ti izbace:
    Code:
    meta list
    amxx list
    amxx modules
    Code:
    #YoMama {
        width: 200%;
        overflow: visible;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •