Raised This Month: $ Target: $400
 0% 

(KREEDZ) How to check player CPs, TPs?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-14-2012 , 15:24   (KREEDZ) How to check player CPs, TPs?
Reply With Quote #1

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])
    

bazhenov93 is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-14-2012 , 15:30   Re: (KREEDZ) How to check player CPs, TPs?
Reply With Quote #2

Check if they are both 0?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-14-2012 , 15:35   Re: (KREEDZ) How to check player CPs, TPs?
Reply With Quote #3

Quote:
Originally Posted by bibu View Post
Check if they are both 0?
I don't know how to, I'm just editing an plugin and making it how I like...
bazhenov93 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-14-2012 , 15:43   Re: (KREEDZ) How to check player CPs, TPs?
Reply With Quote #4

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])
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-14-2012 , 16:06   Re: (KREEDZ) How to check player CPs, TPs?
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
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
bazhenov93 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 07:46.


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