AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   (KREEDZ) How to check player CPs, TPs? (https://forums.alliedmods.net/showthread.php?t=182893)

bazhenov93 04-14-2012 15:24

(KREEDZ) How to check player CPs, TPs?
 
I edited this code, and I don't know how check if player used 0 checkpoints & 0 teleports

PHP Code:

public show_finish_message(idFloat:kreedztime)
{
    new 
name[32]
    new 
imin,isec,imswpn get_user_weaponid 
    
get_user_name(idname31)
    
kreedztime get_gametime() - timer_time[id]
    
imin floatround(kreedztime 60.0floatround_floor)
    
isec floatround(kreedztime imin 60.0,floatround_floor)
    
ims floatround( ( kreedztime - ( imin 60.0 isec ) ) * 100.0floatround_floor )
    
    
ColorChat(0GREEN"%s^1 finished with ^4%s ^3in^4 %02i:%02i.%02i ^3(^1 CPs: ^4%d^3 | ^1 TPs: ^4%d^3",name,g_weaponsnames[wpn],imin,isec,imschecknumbers[id], gochecknumbers[id])
    }
    
    if(
checknumbers[id0], gochecknumbers[id0// here need to edit
    
{
    
ColorChat(0GREEN"%s finished with ^4%s ^3in^4 %02i:%02i.%02i ^3without checkpoints!",name,g_weaponsnames[wpn],imin,isec,imschecknumbers[id], gochecknumbers[id])
    



bibu 04-14-2012 15:30

Re: (KREEDZ) How to check player CPs, TPs?
 
Check if they are both 0? :mrgreen:

bazhenov93 04-14-2012 15:35

Re: (KREEDZ) How to check player CPs, TPs?
 
Quote:

Originally Posted by bibu (Post 1689189)
Check if they are both 0? :mrgreen:

I don't know how to, I'm just editing an plugin and making it how I like...

ConnorMcLeod 04-14-2012 15:43

Re: (KREEDZ) How to check player CPs, TPs?
 
What is the kz plugin you are using ?
Code looks stupid, for example that kreedztime that is passed as an argument for absolutely nothing.

If i were you i would try pro kreedz ultimate.

Ok try this :

PHP Code:

public show_finish_message(idFloat:kreedztime)
{
    new 
name[32]
    
get_user_name(idnamecharsmax(name))
    new 
wpn get_user_weaponid )
    
kreedztime get_gametime() - timer_time[id]
    new 
imin floatround(kreedztime 60.0floatround_floor)
    new 
isec floatround(kreedztime imin 60.0,floatround_floor)
    new 
ims floatround( ( kreedztime - ( imin 60.0 isec ) ) * 100.0floatround_floor )

    new 
cp checknumbers[id]
    if( !
cp )
    {
        
ColorChat(0GREEN"%s finished with ^4%s ^3in^4 %02i:%02i.%02i ^3without checkpoints!",name,g_weaponsnames[wpn],imin,isec,ims)
    }
    else
    {
        
ColorChat(0GREEN"%s^1 finished with ^4%s ^3in^4 %02i:%02i.%02i ^3(^1 CPs: ^4%d^3 | ^1 TPs: ^4%d^3",name,g_weaponsnames[wpn],imin,isec,imscpgochecknumbers[id])
    }



bazhenov93 04-14-2012 16:06

Re: (KREEDZ) How to check player CPs, TPs?
 
Quote:

Originally Posted by ConnorMcLeod (Post 1689199)
What is the kz plugin you are using ?
Code looks stupid, for example that kreedztime that is passed as an argument for absolutely nothing.

If i were you i would try pro kreedz ultimate.

Ok try this :

PHP Code:

public show_finish_message(idFloat:kreedztime)
{
    new 
name[32]
    
get_user_name(idnamecharsmax(name))
    new 
wpn get_user_weaponid )
    
kreedztime get_gametime() - timer_time[id]
    new 
imin floatround(kreedztime 60.0floatround_floor)
    new 
isec floatround(kreedztime imin 60.0,floatround_floor)
    new 
ims floatround( ( kreedztime - ( imin 60.0 isec ) ) * 100.0floatround_floor )

    new 
cp checknumbers[id]
    if( !
cp )
    {
        
ColorChat(0GREEN"%s finished with ^4%s ^3in^4 %02i:%02i.%02i ^3without checkpoints!",name,g_weaponsnames[wpn],imin,isec,ims)
    }
    else
    {
        
ColorChat(0GREEN"%s^1 finished with ^4%s ^3in^4 %02i:%02i.%02i ^3(^1 CPs: ^4%d^3 | ^1 TPs: ^4%d^3",name,g_weaponsnames[wpn],imin,isec,imscpgochecknumbers[id])
    }



I'm using ProKreedz 2.27 (sql)

Thanks Connor! Your code is working :3


All times are GMT -4. The time now is 07:46.

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