AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Getting time left before c4 explotion (https://forums.alliedmods.net/showthread.php?t=340447)

GoldNux 11-18-2022 21:25

Getting time left before c4 explotion
 
edit: Solved: Christ.. I put %i instead of %f SORRY!

Below is how I see it used when looking at examples, but for me it just prints:
1107723518
1107948770

PHP Code:

public printC4Timer()
{
    new 
c4 fm_find_ent_by_model(-1"grenade""models/w_c4.mdl")
    new 
float:explode_time cs_get_c4_explode_time(c4) - get_gametime( );
    
client_cmd(0"say %i"explode_time)




All times are GMT -4. The time now is 15:41.

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