Raised This Month: $ Target: $400
 0% 

[Help] Need help with my code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 11-17-2014 , 04:47   [Help] Need help with my code
Reply With Quote #1

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

(Sorry for my bad English )
__________________
Shiina.Mashiro 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 17:30.


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