Page 1 of 1

[CZ][INC&NATIVE] Czero Tutor

Posted: Sat Oct 03, 2026 3:36 pm
by Archive-Poster
[Description]
This include able you to make advices with czero tutor!
Works ONLY in CS: Condition-Zero

OBS: I know that have another czero tutor inc, but that have so many erros.

- Put the file czerotutor.amxx in: amxmodx/plugins/
- Open the file amxmodx/configs/plugins.ini and write czerotutor.amxx

[Functions]

Code: Select all

enum
{
	NONE = 0,
	RED,
	BLUE,
	YELLOW,
	GREEN
}

/**
 * Create a tutor
 *
 * @param id		Player index.
 * @param color		Color of the text.
 * @param sound		Sound to play when display tutor.
 * @param time		Time to the tutor still alive.
 * @param input		Text to display in tutor.
 * @return			1 on success, 0 otherwise.
 */
native create_user_cztutor(id, color = GREEN, sound[] = "", Float:time = 0.0, const input[] = "");


/**
 * Remove player tutor.
 *
 * @param id		Player index.
 * @return			1 on success, 0 otherwise.
 */
native remove_user_cztutor(id);


/**
 * Check if a tutor is displaying to this player.
 *
 * @param id		Player index.
 * @return			Color of player tutor (If not exists will return NONE).
 */
native is_user_cztutor(id);
Example

Code: Select all

#include <amxmodx>
#include <czerotutor>

// Native only support .wav sounds
new szSound[] = { "sound/misc/tutor.wav" }

public plugin_precache()
{
	// Renember you have to precache the sound
	precache_sound(szSound)
}

public plugin_init() 
{
	register_plugin("New Plugin", "1.0", "Dark Style")
	
	register_event("HLTV", "roundstart", "a", "1=0", "2=0")
}

public client_authorized(id)
{
	// Index, Text, Color, Sound, Time.
	create_user_cztutor(id, RED, szSound, 5.0, "Welcome!")
}

public roundstart()
{
	// You don't need to get_players when don't have id, the native do it for you.
	if(is_user_cztutor(0) != NONE)
		remove_user_cztutor(0), create_user_cztutor(0, RED, szSound, 5.0, "Dungerous Server^nIP: XXX.XXX.XXX:XXXXX!")
	else
		create_user_cztutor(0, RED, szSound, 5.0, "Dungerous Server^nIP: XXX.XXX.XXX:XXXXX!")
}