This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

GodMode stops on new round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shirospyro
Junior Member
Join Date: Dec 2011
Location: Brunei
Old 12-26-2011 , 07:30   GodMode stops on new round
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>

#define AUTHOR "shiro."
#define PLUGIN "Kabal"
#define VERSION "1.0"
#define PREFIX "[Y-Peace]"

public plugin_init()
{
    
register_concmd"sv_kabal""Kabal") ;
}

public 
Kabal(id)
{
    if(
get_user_godmode(id))
    {
        
client_print(idprint_chat,"%s Inda lagi kabal yo!"PREFIX) ;
        
set_user_godmode(id0) ;
    }
    else
    {
        
client_print(idprint_chat,"%s Bah! Kau kabal ni! Chest batu!"PREFIX) ;
        
set_user_godmode(id1) ;
    }

How do I make it stays, I mean the GodMode. Because when I activate it, it stops on the next round.
shirospyro is offline
Send a message via MSN to shirospyro Send a message via Skype™ to shirospyro
TETYYS
Junior Member
Join Date: Oct 2011
Old 12-28-2011 , 06:38   Re: GodMode stops on new round
Reply With Quote #2

PHP Code:
#include <amxmodx> 
#include <cstrike> 
#include <fun> 
#define PREFIX "[Y-Peace]"
new god[32];
public 
plugin_init() {
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1);
register_concmd"sv_kabal""Kabal") ;
register_plugin("Plugin to some dude""1.0""TETYYS");
}
public 
fwHamPlayerSpawnPost(id) {
if (
is_user_alive(id) && (god[id] == 1))
{
set_user_godmode(id1);
}
}
public 
Kabal(id

    if(
get_user_godmode(id)) 
    { 
        
client_print(idprint_chat,"%s Inda lagi kabal yo!"PREFIX) ; 
        
set_user_godmode(id0); 
        
god[id] = 0;
    } 
    else 
    { 
        
client_print(idprint_chat,"%s Bah! Kau kabal ni! Chest batu!"PREFIX) ; 
        
set_user_godmode(id1);
        
god[id] = 1;
    } 

P.S. You forgot to register your plugin. Mine is registered.

Last edited by TETYYS; 12-28-2011 at 06:44.
TETYYS is offline
shirospyro
Junior Member
Join Date: Dec 2011
Location: Brunei
Old 12-31-2011 , 12:58   Re: GodMode stops on new round
Reply With Quote #3

Quote:
Originally Posted by TETYYS View Post
PHP Code:
#include <amxmodx> 
#include <cstrike> 
#include <fun> 
#define PREFIX "[Y-Peace]"
new god[32];
public 
plugin_init() {
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1);
register_concmd"sv_kabal""Kabal") ;
register_plugin("Plugin to some dude""1.0""TETYYS");
}
public 
fwHamPlayerSpawnPost(id) {
if (
is_user_alive(id) && (god[id] == 1))
{
set_user_godmode(id1);
}
}
public 
Kabal(id

    if(
get_user_godmode(id)) 
    { 
        
client_print(idprint_chat,"%s Inda lagi kabal yo!"PREFIX) ; 
        
set_user_godmode(id0); 
        
god[id] = 0;
    } 
    else 
    { 
        
client_print(idprint_chat,"%s Bah! Kau kabal ni! Chest batu!"PREFIX) ; 
        
set_user_godmode(id1);
        
god[id] = 1;
    } 

P.S. You forgot to register your plugin. Mine is registered.
Ah thanks. Btw, what does [32] represent?
PHP Code:
new god[32]; 
Does it always have to be [32]?
shirospyro is offline
Send a message via MSN to shirospyro Send a message via Skype™ to shirospyro
Old 12-31-2011, 13:05
Devil259
This message has been deleted by Devil259.
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-31-2011 , 13:57   Re: GodMode stops on new round
Reply With Quote #4

@Devil259
Please stop posting shit on the forum, always when you post something it is full of errors or stupid things.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 14:51.


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