AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Please tell me how to do it (https://forums.alliedmods.net/showthread.php?t=195206)

Apokalipsisa 09-04-2012 17:08

Please tell me how to do it
 
Hello guys,i have a new question.I used CSX to check if player defuse the bomb.But how can i make something like that:

If player is defusing the bomb to work some code,if player stop defusing to work another code.How to do it?I only make that with public bomb_defusing(id).But how to check if player stop defusing?And i want to ask you another question too.Is it better to use loop with get_players for this function(public bomb_defusing()) or i dont have to use,becouse she can give me ID public bomb_defusing(id).

Liverwiz 09-05-2012 00:23

Re: Please tell me how to do it
 
Code:

if(pev(id, pev_buttons) & IN_USE)
    // user is holding e (currently defusing bomb)

Use that in combination with some flag set in bomb_defusing
That is assuming that bomb_defusing is only fired once. I'd put print statements in that forward to see how it works in real time.


All times are GMT -4. The time now is 08:13.

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