AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved [ H3LP ] Message BarTime ? (https://forums.alliedmods.net/showthread.php?t=295983)

CrazY. 04-09-2017 15:16

[ H3LP ] Message BarTime ?
 
Its possible to do a bar that will be empty when player is pressing E key ?

semihkerim31 04-09-2017 15:18

Re: [ H3LP ] Message BarTime ?
 
Code:

public showbar(id)
{
bargoster(id,2)
}
stock bargoster(iPlayer, iBarScale) {
        message_begin(MSG_ONE, g_iMsgIdBarTime, _, iPlayer)
        write_short(iBarScale)
        message_end()
}


CrazY. 04-09-2017 16:01

Re: [ H3LP ] Message BarTime ?
 
Tryed this but dont work correctly.

Code:
#include <amxmodx> #include <fakemeta> public plugin_init() {     register_plugin("Test", "Crazy", "test");     register_forward(FM_PlayerPreThink, "fw_PlayerPreThink"); } public fw_PlayerPreThink(id) {     if (!is_user_alive(id)) return;     new button = pev(id, pev_button);     if (button & IN_USE)     {         create_bar(id, 2);     } } stock create_bar(id, scale) {     message_begin(MSG_ONE, get_user_msgid("BarTime"), _, id)     write_short(scale)     message_end() }

CrazY. 04-09-2017 16:57

Re: [ H3LP ] Message BarTime ?
 
[BP]
Acredito que dessa forma não vai funcionar porque estou tentando utilizar a tecla E, e o código ta funcionando, o problema é que a barrinha não enche, só enche quando eu solto a letra E.

[En]
I think with this way dont will work because I AM trying with key E, and this code its working but only load when I loose the key E.

PRoSToTeM@ 04-09-2017 23:50

Re: [ H3LP ] Message BarTime ?
 
Try this condition:
PHP Code:

if ((button IN_USE) != && (pev(idpev_oldbuttons) & IN_USE) == 0


CrazY. 04-10-2017 06:56

Re: [ H3LP ] Message BarTime ?
 
Solved.


All times are GMT -4. The time now is 17:55.

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