AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] Need help with my code (https://forums.alliedmods.net/showthread.php?t=251674)

Shiina.Mashiro 11-17-2014 04:47

[Help] Need help with my code
 
Hi, I'm trying to add the votemod to a multimod plugin
here is my short code:
PHP Code:

new g_voted_yet[id]
new 
g_voted_playerg_current_player
public vote_nextmod(id)
{
    if(
g_voted_yet[id] == 0)
    {
        
g_voted_yet[id] = 1
        g_voted_player
++
        
g_current_player get_playersnum(0)
        new 
Float:g_voteleft_float
        
new g_voteleft_int
        g_voteleft_float 
= (0.7*g_current_player) - g_voted_player
        g_voteleft_int 
floatround(g_voteleft_float)
        if(
g_voteleft_int <= 0)
        {
            
client_print(0print_chat"Enough player required for the vote.")
            
set_hudmessage(02550, -1.0, -1.0)
            
show_hudmessage(0"The Vote will start in 5 seconds ...")
            
set_task(5.0"start_vote")
        }
        else
        {
            
client_print(0print_chat"Need %d more player to Rock the Vote!"g_voteleft_int)
        }
    }
    else
    {
        
client_print(idprint_chat"You have requested to Rock the Vote already!")
    }


It had no error while compiling, but it didn't work
Can anyone help me with this :D

(Sorry for my bad English :D)


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

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