Raised This Month: $ Target: $400
 0% 

[SOLVED] Perform role-specific order?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 09-25-2015 , 09:36   Re: [HELP] Perform role-specific order?
Reply With Quote #1

I try this, but this only displaying the last message, if [ZP] Test 3

Code:
#include < amxmodx >

new messages[][] =
{
	"[ZP] Test 1",
	"[ZP] Test 2",
	"[ZP] Test 3"
}

public plugin_init()
{
	set_task(2.0, "show_message");
}

public show_message()
{
	new global_variable = global_variable % sizeof(messages);
	client_print(0, print_chat, messages[global_variable]);

	set_task(2.0, "show_message");
}
__________________









Last edited by CrazY.; 09-25-2015 at 09:36.
CrazY. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-25-2015 , 09:40   Re: [HELP] Perform role-specific order?
Reply With Quote #2

You have to create a global variable, you created a local variable named "global_variable". Global variables are declared outside of any function (usually after the includes and before the first function of a plugin).
__________________
fysiks 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 22:18.


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