Raised This Month: $51 Target: $400
 12% 

ProKreedz 2.31


Post New Thread Reply   
 
Thread Tools Display Modes
myshad
New Member
Join Date: Apr 2010
Old 08-28-2011 , 12:48   Re: ProKreedz 2.27
Reply With Quote #581

Where do i see the IP of the Serv in Phpmyadmin? If i search for just-3d.com in a Whois Database and use that IP (test it in Browser) it doesn't work..

Is it normal that /pro15 and /nub15 doesn't work when the SQL Data is not right? Cause it doesn't do anything ingame.. normally i'd think it opens a popup and then says blabla can't connect.. but it doesn't do anything at all.

With the Prorecords i meant something like this in browser
http://www.spanishxj.es/tops/playertop.php

And of course also like /pro15 the Database on the Server.. when u type /prorecs that u see how many Prorecs u have

It's on this Serv: 91.121.14.96:27015

And i still need the amxx Files if the old one (prokreedz 1.0) isnt the current one... cause theres no files here
myshad is offline
jEnKy
Junior Member
Join Date: Mar 2010
Old 09-15-2011 , 00:28   Re: ProKreedz 2.27
Reply With Quote #582

Quote:
Originally Posted by NucL3ra View Post
If you type scout, you'll lose usp & knife and get scout only.
If you type usp while having scout you will not get anything
If you start again the map you'll get usp&knife and lose the scout
Find new bug:
when you drop scout you'll get Pro Top
jEnKy is offline
RuRuRu612754
Senior Member
Join Date: Sep 2011
Old 09-23-2011 , 07:43   Re: ProKreedz 2.27
Reply With Quote #583

To set up a special VIP players, What should I do now?

Last edited by RuRuRu612754; 09-23-2011 at 08:26.
RuRuRu612754 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-24-2011 , 02:47   Re: ProKreedz 2.27
Reply With Quote #584

PHP Code:
#if cellbits == 32
    #define OFFSET_BUYZONE 235
#else
    #define OFFSET_BUYZONE 268
#endif 
Since you use cstrike, remove this.


PHP Code:
new const KZ_TOP15_DIR[] = "addons/amxmodx/configs/kz/top15"
new const KZ_DIR[] = "addons/amxmodx/configs/kz" 
Don't hardcode paths.


PHP Code:
public resethud(id)
{
    if( !
user_has_weapon(id,CSW_KNIFE) )
        
give_itemid,"weapon_knife" )

    if(
firstspawn[id])
    {
        
ColorChat(idGREEN"[XJ]^x01 Welcome to ^x03nucLeaRKz.Idle.Ro ^x01")
        
ColorChat(idGREEN"[XJ]^x01 Visit ^x03www.KZ-Romania.com ^x01")

        if(
get_pcvar_num(kz_checkpoints) == 0)
            
ColorChat(idGREEN"[XJ]^x01 Checkpoints are off.")

        if(
get_pcvar_num(kz_spawn_mainmenu) == 1)
            
kz_menu (id)
    }
    
firstspawn[id] = false

    
return HAM_IGNORED

Use consistent returns, and don't use ResetHUD event instead of spawn.


PHP Code:
public curweapon(id)
{
    new 
WeaponNum read_data(2)
    new 
WeaponActive read_data(1)

     if ((
WeaponNum != g_WeaponUsed[id]) && WeaponActive)  // if weapon has changed and its the active weapon continue 
Put active condition in register_event native.
Would be better to use Ham_Item_Deploy for this, or Ham_CS_ResetPlayerMaxSpeed.


PHP Code:
message_beginMSG_ONE_UNRELIABLEget_user_msgid"StatusText" ) , _id )
        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid"RoundTime" ), _id); 
Cache msg type value.


PHP Code:
    register_forward(FM_StartFrame"fw_StartFrame"
This is not used.


PHP Code:
                for(new 08i++)    
                    if( 
user_has_weapon(idother_weapons[i])  )
                    {
                        
strip_user_weapons(id)
                        
give_item(id,"weapon_knife")
                        
give_item(id,"weapon_usp")
                        
set_pdata_int(id382245)
                    } 
You forgot to exit the loop after code is executed.


PHP Code:
            if( pev(idpev_health) < 100 )
                
set_pev(idpev_health100.0
Use get_user_health and set_user_health.


PHP Code:
            if( !DefaultStart )
            {
                new 
mapname[64]
                
get_mapnamemapname63)
                
kz_set_start(mapnameSavedStart[id])
                
ColorChat(idGREEN"[XJ]^x01 Start position set for this map.")
            } 
Cache mapname, it won't change during the current map...


PHP Code:
        if( get_pdata_int(id114) == 
Use cs_get_user_team.
More general, when you use pdatas, name them.


PHP Code:
    RegisterHamHam_Spawn"weaponbox""FwdSpawnWeaponbox"
Remove weaponbox at this point won't remove linked weapons as well, better to hook Ham_Touch and to do the exacte same code as you made.


PHP Code:
        if( is_user_connectediPlayer ) && ( get_user_flagsiPlayer ) & KZ_LEVEL ) )
        {
            
set_msg_arg_int2ARG_BYTEis_user_aliveiPlayer ) ? SCOREATTRIB_VIP SCOREATTRIB_DEAD );
        } 
Replace connected check with alive, and then don't bother with SCOREATTRIB_DEAD in blobk.


PHP Code:
public msgStatusIcon( const iMsgId, const iMsgDest, const iPlayer )
{
    static 
szMsg];
    
get_msg_arg_string2szMsg);

    if( 
equalszMsg"buyzone" ) )
    {
        
set_pdata_intiPlayerOFFSET_BUYZONEget_pdata_intiPlayerOFFSET_BUYZONE ) & ~( 1<<) )
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE

Here an example of what you can do at map start so you can disable buy :
Code:
public plugin_precache()
{
	new iEnt = create_entity("info_map_parameters")
	set_pdata_int(iEnt, 34, 3)
	dllfunc(DLLFunc_Spawn, iEnt)

	RegisterHam(Ham_Spawn, "info_map_parameters", "InfoMapParameters_Spawn")
Code:
public InfoMapParameters_Spawn( iEnt )
{
	remove_entity(iEnt)
	return HAM_SUPERCEDE
}
Code:
	register_clcmd("buy", "ClientCommand_Buy")
	register_clcmd("bUy", "ClientCommand_Buy")
	register_clcmd("buY", "ClientCommand_Buy")
	register_clcmd("bUY", "ClientCommand_Buy")
	register_clcmd("Buy", "ClientCommand_Buy")
	register_clcmd("BUy", "ClientCommand_Buy")
	register_clcmd("BuY", "ClientCommand_Buy")
	register_clcmd("BUY", "ClientCommand_Buy")
Code:
// This is only to prevent buy menu from opening, this menu wouldn't work anyway
public ClientCommand_Buy(id)
{
	return PLUGIN_HANDLED_MAIN
}

PHP Code:
public plugin_end( )
{
    
TrieDestroyg_tStarts )
    
TrieDestroyg_tStops )

FYI, this is not needed.


PHP Code:
public timer_task()
{
    for(new 
i=1;i<=MaxPlayers;i++) 
Use get_players there, then you don't need to check if player is connected and you can also remove bots and hltvs.
Then you have 2 ways, use get_players twice, 1 with dead flag, 1 with alive flag (i would do this), the other way would be to check is_user_alive


PHP Code:
public client_command(id)
{
    static 
szCmd[13]
    
read_argv(0szCmd12)
    
    static const 
commands_block[][] =
    {
        
"radio1""radio2""radio3",
        
"coverme""takepoint""holdpos",
        
"regroup""followme""takingfire",
        
"go""fallback""sticktog",
        
"getinpos""stormfront""report",
        
"roger""enemyspot""needbackup",
        
"sectorclear""inposition""reportingin",
        
"getout""negative""enemydown",
        
"chooseteam""jointeam 1"
    
}
        
    static const 
drop_weapons[][] =
    {    
        
"drop"
    
}
    
    if (
get_pcvar_num(kz_use_radio) == 0)
        for ( new 
sizeofcommands_block ) ; i++ )
        {
            if(
equal(szCmdcommands_block[i]))
            return 
PLUGIN_HANDLED;
        }
    else
        return 
PLUGIN_CONTINUE    

    
if (get_pcvar_num(kz_drop_weapons) == 0)
        for ( new 
sizeofdrop_weapons ) ; i++ )
        {
            if(
equal(szCmddrop_weapons[i]))
            return 
PLUGIN_HANDLED
        
}
    else
        return 
PLUGIN_CONTINUE    

    
return PLUGIN_CONTINUE

Since you don't use equali, use register_clcmd instead of client_command forward.
Also, for radios, here is a better code :
Code:
public Player_Spawn( id )
{
	if( is_user_alive( id ) )
	{
		// Set this pdata will let menu avalaible, but menu can't be used anyway.
		// you can register radio menu commands and block them if you want.
		#define XO_PLAYER				5
		#define	m_iRadiosLeft			192
		set_pdata_int(id, m_iRadiosLeft, 0, XO_PLAYER)
		}

PHP Code:
    static const drop_weapons[][] =
    {    
        
"drop"
    
}
    if (
get_pcvar_num(kz_drop_weapons) == 0)
        for ( new 
sizeofdrop_weapons ) ; i++ )
        {
            if(
equal(szCmddrop_weapons[i]))
            return 
PLUGIN_HANDLED
        
}
    else
        return 
PLUGIN_CONTINUE 
I this this is a joke, loop a 1 dimension array...
But as said before, use register_clcmd instead.


PHP Code:
        give_item(id,"weapon_usp"
        
give_item(id,"weapon_usp"
        
give_item(id,"weapon_usp"
... Use cs_set_user_bpammo.


PHP Code:
    set_pevidpev_velocityFloat:{0.00.00.0} );
    
set_pevidpev_flagspev(idpev_flags) | FL_DUCKING );
    
set_pevidpev_fuser20.0 );
    
engfuncEngFunc_SetSizeid, {-16.0, -16.0, -18.0 }, { 16.016.018.0 } );
    
set_pev(idpev_originCheckpointsid ][ !g_bCpAlternate[id] ] ) 
You use wrong values here, here are correct ones :
Code:
new const Float:VEC_DUCK_HULL_MIN[3]	= {-16.0, -16.0, -18.0 }
new const Float:VEC_DUCK_HULL_MAX[3]	= { 16.0,  16.0,  32.0 }
new const Float:VEC_DUCK_VIEW[3]		= {  0.0,   0.0,  12.0 } // this one is for pev_view_ofs

PHP Code:
public noclip(id)
{
    
set_user_noclip(idget_user_noclip(id) == 1)
    if(
get_user_noclip(id) == 1)
        
detect_cheat(id,"Noclip")
    
ColorChat(idGREEN"[XJ]^x01 Noclip ^x03%s^x01"get_user_noclip(id) ? "ON" "OFF")
    
    return 
PLUGIN_HANDLED
}
public 
GodMode(id)
{
    
set_user_godmode(idget_user_godmode(id) == 1)
    if(
get_user_godmode(id) == 1)
        
detect_cheat(id,"God Mode")
    
ColorChat(idGREEN"[XJ]^x01 God Mode ^x03%s^x01"get_user_godmode(id) ? "ON" "OFF")
    
    return 
PLUGIN_HANDLED

You only need to use get_user_noclip ONCE here, same for get_user_godmode.


PHP Code:
public MenuHandler(id menuitem)
{
    if( 
item == MENU_EXIT ) {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[32]
    new 
accesscallback
   
    menu_item_getinfo
(menuitemaccessdata5__callback)
    
    new 
key str_to_num(data)
    
get_user_name(idname31

    switch(
key) {
        case 
1:{
            
CheckPoint(id)
            
kz_menu(id)
        }
        case 
2:{
            
GoCheck(id)
            
kz_menu(id)
        }
        case 
3:{
            
top15menu(id)
        }
        case 
4:{
            
goStart(id)
            
kz_menu(id)
        }
        case 
5:{
            
ShowTimer_Menu(id)
        }
        case 
6:{
            
Pause(id)
            
kz_menu(id)
        }
        case 
7:{
            
InvisMenu(id)
        }
        case 
8:{
            
ct(id)
            
        }
        case 
9:{
            
reset_checkpoints(id)
            
kz_menu(id)
        }
        case 
'*':{
        }
    }

    return 
PLUGIN_HANDLED

get_user_name is not used
I doubt str_to_num('*') is equal to '*', instead of using menu_item_getinfo and str_to_num, you could directly use "item", item starts at 0 though, not 1.
Also, menus have an exit item by default, that one you check at the begining of your menu callback.


PHP Code:
        case 9:
        {
            
show_menu(id,0,"")
        } 
Same here, menu already has an exit item, 9 will never be triggered.

So, in all your menus, you don't need to use menu_item_getinfo and str_to_num, just use switch( item ) but instead of starting at 1, start at 0, and don't bother about exit thing (exept the item MENU_EXIT check, obviously), it is already handled by default by this menu system.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
D@NG3R
Member
Join Date: Feb 2010
Old 09-25-2011 , 17:26   Re: ProKreedz 2.27
Reply With Quote #585

The server can't contact the sql server what am i doing wrong?

I edit:

kz/config.cfg like this:

kz_sql_host "46.47.74.184"
kz_sql_files "46.47.74.184"
kz_sql_user "-------"
kz_sql_pass "-------"
kz_sql_db = "tops"
kz_sql_name = "ForgottenKz # Jump"

And also

htdocs\tops\kz_lastpro.php

define("DB_HOST", "46.47.74.184");
define("DB_USER", "--------");
define("DB_PASS", "--------");
define("DB_NAME", "tops");

Last edited by D@NG3R; 09-25-2011 at 17:29.
D@NG3R is offline
plowed
Senior Member
Join Date: Oct 2010
Location: germany
Old 09-26-2011 , 08:10   Re: ProKreedz 2.27
Reply With Quote #586

Quote:
Originally Posted by D@NG3R View Post
The server can't contact the sql server what am i doing wrong?

I edit:

kz/config.cfg like this:

kz_sql_host "46.47.74.184"
kz_sql_files "46.47.74.184"
kz_sql_user "-------"
kz_sql_pass "-------"
kz_sql_db = "tops"
kz_sql_name = "ForgottenKz # Jump"

And also

htdocs\tops\kz_lastpro.php

define("DB_HOST", "46.47.74.184");
define("DB_USER", "--------");
define("DB_PASS", "--------");
define("DB_NAME", "tops");
change "kz_sql_files" to "kz_sql_file" in the .cfg. Its a typo from nuclear
__________________
Zombie Mod + gameMe stats :
plowed is offline
D@NG3R
Member
Join Date: Feb 2010
Old 09-26-2011 , 12:35   Re: ProKreedz 2.27
Reply With Quote #587

Still not working
D@NG3R is offline
plowed
Senior Member
Join Date: Oct 2010
Location: germany
Old 09-26-2011 , 13:00   Re: ProKreedz 2.27
Reply With Quote #588

Where do you saved the php files?
You need smth like this
kz_sql_file "http://www.247cs.de/top15/"
http://www.247cs.de/top15/map.php
__________________
Zombie Mod + gameMe stats :
plowed is offline
D@NG3R
Member
Join Date: Feb 2010
Old 09-26-2011 , 13:10   Re: ProKreedz 2.27
Reply With Quote #589

kz_sql_host "http://impossible-cs.info"
kz_sql_file "http://impossible-cs.info/top15/"
kz_sql_user "-----"
kz_sql_pass "-----"
kz_sql_db = "top15"
kz_sql_name = "ForgottenKz # Jump"

And still nothing..

php top15 part is

htdocs/top15 files are in it.

Last edited by D@NG3R; 09-26-2011 at 14:28.
D@NG3R is offline
jEnKy
Junior Member
Join Date: Mar 2010
Old 09-27-2011 , 10:50   Re: ProKreedz 2.27
Reply With Quote #590

if
Quote:
The server can't contact the sql server what am i doing wrong?
so kz_sql_file doesn't matter, i think the problems are kz_sql_host + kz_sql_user + kz_sql_pass + kz_sql_db.

Does php work ??
jEnKy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode