Raised This Month: $ Target: $400
 0% 

Basic_info help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VanLi_bRuSly*
Member
Join Date: Mar 2010
Old 05-21-2010 , 15:06   Basic_info help
Reply With Quote #1

how much more I can do
Quote:
"gwalt",
"narkotyki",
"zabojstwo",
"alkohol",
"molestowanie",
"pobicie babci",
"napad na monopolowy",
"dziesione"
alternative?


Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Jail Break: Basic Info"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

#define USERTASK 921
#define UPDATEDELAY 1.0

new static reasons[][] = { 
    "gwalt",
    "narkotyki",
    "zabojstwo",
    "alkohol",
    "molestowanie",
    "pobicie babci",
    "napad na monopolowy",
    "dziesione"
}

new userreason[33]
new rounds, hudhandler

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)    
    
    register_event("TextMsg","restart_roundsnum","a","2&#Game_C"/*,"2&#Game_w"*/) 
    
    register_logevent("round_end", 2, "1=Round_End")  
    
    RegisterHam(Ham_Spawn, "player", "client_spawn", 1)    
    
    hudhandler = CreateHudSyncObj()
}

public round_end()
{
    rounds ++
}

public restart_roundsnum() 
{
    rounds = 0 
}

public client_disconnect(id)
{
    userreason[id] = -1
    
    if(task_exists(id + USERTASK))
    {
        remove_task(id + USERTASK)
    }
}

public client_spawn(id)
{    
    if(task_exists(id + USERTASK))
    {
        remove_task(id + USERTASK)
    }    
    
    if(get_user_team(id) == 1)
    {    
        userreason[id] = random_num(0, sizeof reasons - 1)
        
        set_task(UPDATEDELAY, "client_jailinfo", id + USERTASK, _, _, "b")
    }    
}

public client_jailinfo(TASKID)
{
    static id
    id = TASKID - USERTASK
    
    set_hudmessage(0, 255, 0, 0.8, 0.1, 0, 6.0, 12.0)
    
    ShowSyncHudMsg(id, hudhandler, "Dzien %d | Siedzisz za %s.", rounds, reasons[userreason[id]])    
}
VanLi_bRuSly* is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 05-21-2010 , 15:27   Re: Basic_info help
Reply With Quote #2

I don't really understand what you are trying to do, can you please be more accurate?
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
VanLi_bRuSly*
Member
Join Date: Mar 2010
Old 05-21-2010 , 15:45   Re: Basic_info help
Reply With Quote #3

have to go to jail because I want them to reproduce
VanLi_bRuSly* is offline
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 05-21-2010 , 16:06   Re: Basic_info help
Reply With Quote #4

You can type as much reasons as you want
__________________
unnyquee is offline
VanLi_bRuSly*
Member
Join Date: Mar 2010
Old 05-21-2010 , 16:32   Re: Basic_info help
Reply With Quote #5

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Jail Break: Basic Info"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

#define USERTASK 921
#define UPDATEDELAY 1.0

new static reasons[][] = { 
    "gwalt",
    "narkotyki",
    "zabojstwo",
    "alkohol",
    "molestowanie",
    "pobicie babci",
    "napad na monopolowy",
    "dziesione"
    "wwwww",
    "yyyyy",
    "xxxxx",
}

new userreason[33]
new rounds, hudhandler

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)    
    
    register_event("TextMsg","restart_roundsnum","a","2&#Game_C"/*,"2&#Game_w"*/) 
    
    register_logevent("round_end", 2, "1=Round_End")  
    
    RegisterHam(Ham_Spawn, "player", "client_spawn", 1)    
    
    hudhandler = CreateHudSyncObj()
}

public round_end()
{
    rounds ++
}

public restart_roundsnum() 
{
    rounds = 0 
}

public client_disconnect(id)
{
    userreason[id] = -1
    
    if(task_exists(id + USERTASK))
    {
        remove_task(id + USERTASK)
    }
}

public client_spawn(id)
{    
    if(task_exists(id + USERTASK))
    {
        remove_task(id + USERTASK)
    }    
    
    if(get_user_team(id) == 1)
    {    
        userreason[id] = random_num(0, sizeof reasons - 1)
        
        set_task(UPDATEDELAY, "client_jailinfo", id + USERTASK, _, _, "b")
    }    
}

public client_jailinfo(TASKID)
{
    static id
    id = TASKID - USERTASK
    
    set_hudmessage(0, 255, 0, 0.8, 0.1, 0, 6.0, 12.0)
    
    ShowSyncHudMsg(id, hudhandler, "Dzien %d | Siedzisz za %s.", rounds, reasons[userreason[id]])    
}

such error happens when I add them.

Where am I doing incorrect?
VanLi_bRuSly* is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 05-21-2010 , 16:33   Re: Basic_info help
Reply With Quote #6

Post the error...
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-21-2010 , 16:38   Re: Basic_info help
Reply With Quote #7



Code:
"dziesione",
__________________
fysiks is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 05-21-2010 , 16:38   Re: Basic_info help
Reply With Quote #8

At the end of array "reasons", last entry, in your case "xxxxx", should not have comma after it.

PHP Code:
new static reasons[][] = { 
    
"gwalt",
    
"narkotyki",
    
"zabojstwo",
    
"alkohol",
    
"molestowanie",
    
"pobicie babci",
    
"napad na monopolowy",
    
"dziesione",
    
"wwwww",
    
"yyyyy",
    
"xxxxx"

And all before last entry should have a comma.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
VanLi_bRuSly*
Member
Join Date: Mar 2010
Old 05-22-2010 , 03:02   Re: Basic_info help
Reply With Quote #9

Quote:
Originally Posted by Alka View Post
At the end of array "reasons", last entry, in your case "xxxxx", should not have comma after it.

PHP Code:
new static reasons[][] = { 
    
"gwalt",
    
"narkotyki",
    
"zabojstwo",
    
"alkohol",
    
"molestowanie",
    
"pobicie babci",
    
"napad na monopolowy",
    
"dziesione",
    
"wwwww",
    
"yyyyy",
    
"xxxxx"

And all before last entry should have a comma.

Thank you
VanLi_bRuSly* 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 03:37.


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