Cerere plugin VIP [Rezolvat]

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Djjfurien
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 05 Jan 2019, 21:49
Detinator Steam: Da
CS Status: Furien.Indungi.Ro # XP FURIEN MOD
Detinator server CS: Da
SteamID: privat
Fond eXtream: 0
Location: Neamt
Contact:

01 Feb 2019, 23:52

Plugin Cerut: Vip pentru mod FURIEN
Descriere (adica ce face el mai exact): As dori un vip pentru modul furien, ce sa contina teleport, si godmode, si aspectul de mai jos.

Meniu VIP Premium:

1. Teleport
2. GodMode

0. Exit

Cum vreau mai exact?:
VIP sa se poata da dintr-un anumit folder, nu din users.ini. De exemplu, doar sa trec nick-ul jucatorilor in alt folder fie .ini fie .txt, si de acolo sa bag gradul. Sa pun numele complet intre "", exemplu: "Djjfurien".
Doresc si mesaje in chat.
Daca nu ai acces la comanda: Doar VIP-II Premium au acces la aceasta comanda.
Cand deschizi meniul: Ai deschis meniul VIP Premium.
Cand alegi o putere: Ai ales Teleport/GodMode. Aceasta putere poate fi folosita odata la 20 secunde.
Cand nu trec cele 20 secunde de la ultima folosire, sa scrie: Nu au trecut 20 secunde de la ultima folosire a puterii.

Mentionez, sa se poata utiliza DOAR o putere pe runda! De aici v-ati prins voi, poate mai trebuie ceva pe langa ce am precizat eu.. Este deja acest plugin, dar nu se poate compila, si are mai multe incluse.. Eu vreau strict doar godmode si teleport. Godmode sa fie doar 3 secunde.
Serverul ruleaza (HLDS/ReHLDS):ReHDLS
Versiune AMX Mod X: 1.8.2 cred
Modul Serverului: furien
Last edited by cs_all on 10 Feb 2019, 18:52, edited 1 time in total.
Reason: Marcat ca "Rezolvat"
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2155
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 348 times
Contact:

02 Feb 2019, 01:33

Este deja acest plugin, dar nu se poate compila, si are mai multe incluse..
ce plugin zici?
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
* Inactiv momentan.
Djjfurien
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 05 Jan 2019, 21:49
Detinator Steam: Da
CS Status: Furien.Indungi.Ro # XP FURIEN MOD
Detinator server CS: Da
SteamID: privat
Fond eXtream: 0
Location: Neamt
Contact:

02 Feb 2019, 09:10

cereri-pluginuri/cerere-plugin-furien-t218242.html Acesta

Mentionez, prntru utilizarea puterii trebuie bind "tasta" power, dar sa nu se faca bin automat si sa modifice fisierele jucatorului (adica configs.cfg)
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2155
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 348 times
Contact:

02 Feb 2019, 14:57

| Afiseaza codul
[code]
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < fun >
#include < xs >
#include <hamsandwich>

#pragma tabsize 0

#define POWERS_TIMER	 20.0 

new Float:g_fLastUsed[ 33 ],Float:fTime

new bool:g_bTeleport[ 33 ],bool:g_bGM[ 33 ]

new const VIP_DIR[]=	"addons/amxmodx/configs/VIP"
new const VIP_FILE[]=	"vips.ini"

new File[125],bool:IsUserVip[33] = false,Trie:LoadVip

public plugin_init( ) 
{
	register_event( "HLTV", "event_new_round", "a", "1=0", "2=0" );
	
	register_clcmd( "say", "SayChatAnswer" );
	register_clcmd( "say_team", "SayChatAnswer" );
	
	register_concmd( "+teleport", "cmdVIPTeleport" );
	register_concmd( "-teleport", "cmdVIPTeleport" );
	
	LoadVip = TrieCreate()
}

public plugin_precache()	if(!dir_exists(VIP_DIR))	mkdir(VIP_DIR)

public plugin_cfg()
{
	formatex(File,charsmax(File),"%s/%s",VIP_DIR, VIP_FILE)
	if(!file_exists (File))
	{
		write_file (File,"; ===========================================================");
		write_file (File,"; --------------------- VIP LIST ----------------------------");
		write_file (File,"; ===========================================================");
		write_file (File,"; Nota: Incepe randul cu ; pentru a dezactiva un VIP");
		write_file (File,"; Nota: Pentru a adauga un nume cu spatiu, pune-l intre ^"^"");
	}
	
	new FilePointer,Key[32],FileData[256]
	FilePointer = fopen(File,"rt")
	/*if(!file_exists(File))
{
	FilePointer = fopen(File,"w")
	fclose(FilePointer)
}*/
	if(FilePointer)
	{
		while(!feof(FilePointer))//fgets
		{
			//trim(FileData)
			fgets(FilePointer,FileData,charsmax(FileData))
			if ( !strlen (FileData) || FileData[0] == ';' )	continue;
			parse(FileData,Key,charsmax(Key))
			TrieSetCell(LoadVip,Key,charsmax(Key))
		}
		fclose(FilePointer)
	}
}

public client_connect(id) {
	new szName[32]
	get_user_name(id,szName,charsmax(szName))

	if(TrieKeyExists(LoadVip,szName))	IsUserVip[id] = true
}
public client_infochanged(id) {
	new oldname[32],newname[32]
	get_user_name(id,oldname,charsmax(oldname))
	get_user_info(id,"name",newname,charsmax(newname))

	if(equal(newname,oldname))	return
	
	if(TrieKeyExists(LoadVip,newname))	IsUserVip[id] = true
	else	IsUserVip[id] = false
}
public plugin_end()	TrieDestroy(LoadVip)
public client_disconnect(id)	IsUserVip[id] = false

public event_new_round()
{
	for(new id;id<=get_maxplayers();id++)
	{
		g_bGM[id]=false
		g_bTeleport[id]=false
	}
}

public SayChatAnswer( id )
{
	new szSaid[ 132 ];
	read_args( szSaid, sizeof ( szSaid ) - 1 );
	remove_quotes( szSaid );
	
	if ( contain( szSaid, "/vip" )!=-1 || contain( szSaid, "/vips" )!=-1 )
	{
		if(IsUserVip[id])
		{
			ShowMenuVIP( id );
			client_print(id,print_chat,"Ai deschis meniul VIP Premium.")
		}
		else
		{
			client_print(id,print_chat,"Doar VIP-II Premium au acces la aceasta comanda.")
		}
	}
}
public ShowMenuVIP( id )
{
	new szMenu;
	szMenu = menu_create( "\rMeniu VIP Premium:\w", "iContent" );
	
	menu_additem( szMenu, "\wTeleport", 	"2" );
	menu_additem( szMenu, "\wGodMode", 	"1" );
	
	menu_setprop( szMenu, MPROP_NUMBER_COLOR, "\r" );
	menu_setprop( szMenu, MPROP_EXIT, MEXIT_ALL );
	menu_display( id, szMenu, 0 );
}
public iContent( id, szMenu, Item )
{
	if ( Item == MENU_EXIT||!is_user_alive(id) )
	{
		menu_destroy( szMenu )
		return PLUGIN_HANDLED;
	}
	
	new iData[ 9 ], szName[ 32 ];
	new iAccess, iCallback;
	menu_item_getinfo( szMenu, Item, iAccess, iData, sizeof ( iData ) - 1, szName, sizeof ( szName ) - 1, iCallback );
	
	new iKeys = str_to_num( iData );
	switch( iKeys )
	{
		case 1:
		{
			if(g_bGM[id]||g_bTeleport[id])	return PLUGIN_HANDLED
			
			g_bGM[id]=true
			set_user_godmode(id,1)
			
			client_print( id, print_chat, "Ai primit GodMode!" );
			client_print(id,print_chat,"Aceasta putere poate fi folosita odata la 20 secunde.")
			
			if( g_fLastUsed[ id ] > 0.0 && ( fTime - g_fLastUsed[ id ] ) < POWERS_TIMER )
			{
				client_print( id, print_chat, "Nu au trecut %i de la ultima folosire a puterii",floatround( POWERS_TIMER ) );
				return PLUGIN_HANDLED;
			}
			
			g_fLastUsed[id] = fTime;
			
			set_task( 3.0, "End_God", id);
		}
		
		case 2:
		{
			if(g_bTeleport[id]||g_bGM[id])	return PLUGIN_HANDLED
			g_bTeleport[ id ]  = true;
			
			client_cmd( id, ";bind v +teleport" );
			
			client_print( id, print_chat, "Ai primit Teleport!" );
			client_print( id, print_chat, "Aceasta putere poate fi folosita odata la 20 secunde." );
		}
	}
	return PLUGIN_HANDLED
}

public End_God(id)	if(is_user_connected(id)&&g_bGM[id])	set_user_godmode(id,0)

public cmdVIPTeleport( id )
{
	if( !is_user_alive( id ) || !g_bTeleport[ id ] )	return PLUGIN_HANDLED;
	
	fTime = get_gametime( );
	
	if( g_fLastUsed[ id ] > 0.0 && ( fTime - g_fLastUsed[ id ] ) < POWERS_TIMER )
	{
		client_print( id, print_chat, "Nu au trecut %i de la ultima folosire a puterii",floatround( POWERS_TIMER ) );
		return PLUGIN_HANDLED;
	}
	
	static Float:start[ 3 ], Float:dest[ 3 ];
	pev(id, pev_origin, start);
	pev(id, pev_view_ofs, dest);
	xs_vec_add(start, dest, start);
	pev(id, pev_v_angle, dest);
	
	engfunc(EngFunc_MakeVectors, dest);
	global_get(glb_v_forward, dest);
	xs_vec_mul_scalar(dest, 9999.0, dest);
	xs_vec_add(start, dest, dest);
	engfunc(EngFunc_TraceLine, start, dest, IGNORE_MONSTERS, id, 0);
	get_tr2(0, TR_vecEndPos, start);
	get_tr2(0, TR_vecPlaneNormal, dest);
	
	static const player_hull[] = {HULL_HUMAN, HULL_HEAD};
	engfunc(EngFunc_TraceHull, start, start, DONT_IGNORE_MONSTERS, player_hull[_:!!(pev(id, pev_flags) & FL_DUCKING)], id, 0);
	
	if ( !get_tr2(0, TR_StartSolid) && !get_tr2(0, TR_AllSolid) &&  get_tr2(0, TR_InOpen))
	{
		engfunc(EngFunc_SetOrigin, id, start);
		return PLUGIN_HANDLED;
	}
	
	static Float:size[3];
	pev(id, pev_size, size);
	
	xs_vec_mul_scalar(dest, (size[0] + size[1]) / 2.0, dest);
	xs_vec_add(start, dest, dest);
	engfunc(EngFunc_SetOrigin, id, dest);
	
	g_fLastUsed[id] = fTime;
	
	return PLUGIN_HANDLED;
}[/code]
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
* Inactiv momentan.
Djjfurien
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 05 Jan 2019, 21:49
Detinator Steam: Da
CS Status: Furien.Indungi.Ro # XP FURIEN MOD
Detinator server CS: Da
SteamID: privat
Fond eXtream: 0
Location: Neamt
Contact:

02 Feb 2019, 16:20

Cateva erori.
1. Cand ma teleportez, raman blocat in acel loc unde ma teleportez.
2. La godmode, nu sunt sigur daca merge. S-ar putea adauga in hud un mesaj "Godmode activ: Secundele (3,2,1sa apara ca scad secundele).
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2155
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 348 times
Contact:

02 Feb 2019, 18:29

bind v power pentru amân2

spritres de pus:
https://www88.zippyshare.com/v/HZQggIyA/file.html
https://www88.zippyshare.com/v/lrs7NowR/file.html

| Afiseaza codul
[code]
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include <fakemeta_util>
#include < fun >
#include < xs >
#include <hamsandwich>
#include <engine>

#pragma tabsize 0

new bool:g_bTeleport[ 33 ],bool:g_bGM[ 33 ]

//--| GodMode |--//
new GodMode_Cooldown[33] = 0;
new GodMode_DurationCooldown[33] = 0;
//--| Teleport |--//
new TeleportSprite, TeleportSprite2;
new Teleport_Cooldown[33];
new const SOUND_BLINK[] = { "weapons/flashbang-1.wav" };
const UNIT_SEC = 0x1000;
const FFADE = 0x0000;
new CvarTeleportCooldown, CvarTeleportRange,CvarGodModeCooldown, CvarGodModeDuration

new const VIP_DIR[]=   "addons/amxmodx/configs/VIP"
new const VIP_FILE[]=   "vips.ini"

new File[125],bool:IsUserVip[33] = false,Trie:LoadVip

public plugin_init( ) 
{
   register_event( "HLTV", "event_new_round", "a", "1=0", "2=0" );
   register_event("DeathMsg", "Death", "a");
   
   RegisterHam(Ham_Spawn, "player", "Spawn", 1);
   
   register_clcmd( "say", "SayChatAnswer" );
   register_clcmd( "say_team", "SayChatAnswer" );
   
register_clcmd("power", "Power");
   
   LoadVip = TrieCreate()
   
 	CvarTeleportCooldown = register_cvar("vip_teleport_cooldown", "20.0");	// Teleport Cooldown
	CvarTeleportRange = register_cvar("vip_teleport_range", "12345");	// Teleport Range
	
	CvarGodModeCooldown = register_cvar("vip_godmode_cooldown", "20.0");	// GodMode Cooldown
	CvarGodModeDuration = register_cvar("vip_godmode_duration", "3.0");	// GodMode Duration
}

public plugin_precache()
{
	if(!dir_exists(VIP_DIR))   mkdir(VIP_DIR)
	
		TeleportSprite = precache_model( "sprites/shockwave.spr");
	TeleportSprite2 = precache_model( "sprites/blueflare2.spr");
}

public plugin_cfg()
{
   formatex(File,charsmax(File),"%s/%s",VIP_DIR, VIP_FILE)
   if(!file_exists (File))
   {
      write_file (File,"; ===========================================================");
      write_file (File,"; --------------------- VIP LIST ----------------------------");
      write_file (File,"; ===========================================================");
      write_file (File,"; Nota: Incepe randul cu ; pentru a dezactiva un VIP");
      write_file (File,"; Nota: Pentru a adauga un nume cu spatiu, pune-l intre ^"^"");
   }
   
   new FilePointer,Key[32],FileData[256]
   FilePointer = fopen(File,"rt")
   /*if(!file_exists(File))
{
   FilePointer = fopen(File,"w")
   fclose(FilePointer)
}*/
   if(FilePointer)
   {
      while(!feof(FilePointer))//fgets
      {
         //trim(FileData)
         fgets(FilePointer,FileData,charsmax(FileData))
         if ( !strlen (FileData) || FileData[0] == ';' )   continue;
         parse(FileData,Key,charsmax(Key))
         TrieSetCell(LoadVip,Key,charsmax(Key))
      }
      fclose(FilePointer)
   }
}

public client_connect(id) {
   new szName[32]
   get_user_name(id,szName,charsmax(szName))

   if(TrieKeyExists(LoadVip,szName))   IsUserVip[id] = true
}
public client_infochanged(id) {
   new oldname[32],newname[32]
   get_user_name(id,oldname,charsmax(oldname))
   get_user_info(id,"name",newname,charsmax(newname))

   if(equal(newname,oldname))   return
   
   if(TrieKeyExists(LoadVip,newname))   IsUserVip[id] = true
   else   IsUserVip[id] = false
}
public plugin_end()   TrieDestroy(LoadVip)

//------| Client Power |------//
public Power(id)  {
	static Float:start[3];
	static Float:aim[3];

	pev(id, pev_origin, start);
	fm_get_aim_origin(id, aim);

	start[2] += 16.0; // raise
	aim[2] += 16.0; // raise
	
	if (IsUserVip[id]&& is_user_alive(id) && g_bGM[id] && !GodMode_DurationCooldown[id]) {

	if (GodMode_Cooldown[id]) {
	ColorChat(id,"^x03[AMXX]^x04 Puterea GodMode iti va reveni in^x03 %d secunde.",GodMode_Cooldown[id]);
	return PLUGIN_CONTINUE;
	}
	set_user_godmode(id, 1);
	GodMode_DurationCooldown[id] = get_pcvar_num(CvarGodModeDuration)
	set_task(1.0, "GodModeShowHUD", id, _, _, "b");
	set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
	if(get_pcvar_num(CvarGodModeDuration) != 1) {
	show_hudmessage(id, "Ai GodMode pentru: %d secunde",get_pcvar_num(CvarGodModeDuration));
	}
	if(get_pcvar_num(CvarGodModeDuration) == 1) {
	show_hudmessage(id, "Ai GodMode pentru: %d secunda",get_pcvar_num(CvarGodModeDuration));
	}
	return PLUGIN_HANDLED;
	}

	else if  (IsUserVip[id] && is_user_alive(id) && g_bTeleport[id]) {	
	if (Teleport_Cooldown[id]) {
	ColorChat(id,"^x03[AMXX]^x04 Puterea Teleport iti va reveni in^x03 %d secunde.",Teleport_Cooldown[id]);
	return PLUGIN_CONTINUE;
	}
	if (teleport(id)) {
	emit_sound(id, CHAN_STATIC, SOUND_BLINK, 1.0, ATTN_NORM, 0, PITCH_NORM);
	remove_task(id);
	Teleport_Cooldown[id] = get_pcvar_num(CvarTeleportCooldown);
	set_task(1.0, "TeleportShowHUD", id, _, _, "b");
	set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
	if(get_pcvar_num(CvarTeleportCooldown) != 1) {
	show_hudmessage(id, "Puterea Teleport iti va reveni in: %d secunde",get_pcvar_num(CvarTeleportCooldown));
	}
	if(get_pcvar_num(CvarTeleportCooldown) == 1) {
	show_hudmessage(id, "Puterea Teleport iti va reveni in: %d secunda",get_pcvar_num(CvarTeleportCooldown));
	}
	return PLUGIN_HANDLED;
	}
	else {
	Teleport_Cooldown[id] = 0;
	ColorChat(id, "^x03[AMXX]^x04 Pozitia de teleportare este invalida.");
	return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
	}

////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Client |
//==========================================================================================================
//------| Client PutinServer |------//
public client_putinserver(id) {
	GodMode_Cooldown[id] = 0;
	GodMode_DurationCooldown[id] = 0;
	Teleport_Cooldown[id] = 0;
	}
//------| Client Disconnect |------//
public client_disconnect(id) {  
	GodMode_Cooldown[id] = 0;
	GodMode_DurationCooldown[id] = 0;
	Teleport_Cooldown[id] = 0;
	
	IsUserVip[id] = false
	}
//------| Client Spawn |------//	
public Spawn(id) {
	remove_task(id);
	GodMode_Cooldown[id] = 0;
	GodMode_DurationCooldown[id] = 0;
	Teleport_Cooldown[id] = 0;
	}
//------| Client Death |------//
public Death() {
	remove_task(read_data(2));
	GodMode_Cooldown[read_data(2)] = 0;
	GodMode_DurationCooldown[read_data(2)] = 0;
	
	Teleport_Cooldown[read_data(2)] = 0;
	}
//------| Client Power |------//

public event_new_round()
{
   for(new id;id<=get_maxplayers();id++)
   {
      g_bGM[id]=false
      g_bTeleport[id]=false
   }
}

public SayChatAnswer( id )
{
   new szSaid[ 132 ];
   read_args( szSaid, sizeof ( szSaid ) - 1 );
   remove_quotes( szSaid );
   
   if ( contain( szSaid, "/vip" )!=-1 || contain( szSaid, "/vips" )!=-1 )
   {
      if(IsUserVip[id])
      {
         ShowMenuVIP( id );
         client_print(id,print_chat,"Ai deschis meniul VIP Premium.")
      }
      else
      {
         client_print(id,print_chat,"Doar VIP-II Premium au acces la aceasta comanda.")
      }
   }
}
public ShowMenuVIP( id )
{
   new szMenu;
   szMenu = menu_create( "\rMeniu VIP Premium:\w", "iContent" );
   
   menu_additem( szMenu, "\wTeleport",    "2" );
   menu_additem( szMenu, "\wGodMode",    "1" );
   
   menu_setprop( szMenu, MPROP_NUMBER_COLOR, "\r" );
   menu_setprop( szMenu, MPROP_EXIT, MEXIT_ALL );
   menu_display( id, szMenu, 0 );
}
public iContent( id, szMenu, Item )
{
   if ( Item == MENU_EXIT||!is_user_alive(id) )
   {
      menu_destroy( szMenu )
      return PLUGIN_HANDLED;
   }
   
   new iData[ 9 ], szName[ 32 ];
   new iAccess, iCallback;
   menu_item_getinfo( szMenu, Item, iAccess, iData, sizeof ( iData ) - 1, szName, sizeof ( szName ) - 1, iCallback );
   
   new iKeys = str_to_num( iData );
   switch( iKeys )
   {
      case 1:
      {
         if(g_bGM[id]||g_bTeleport[id])   return PLUGIN_HANDLED
         
         g_bGM[id]=true
         set_user_godmode(id,1)
         
         client_print( id, print_chat, "Ai primit GodMode!" );
         client_print(id,print_chat,"Aceasta putere poate fi folosita odata la 20 secunde.")
	 
	remove_task(id);
	if(GodMode_Cooldown[id]) {
	GodModeShowHUD2(id);
	}
      }
      
      case 2:
      {
         if(g_bTeleport[id]||g_bGM[id])   return PLUGIN_HANDLED
         g_bTeleport[ id ]  = true;
         
         client_cmd( id, ";bind v power" );
         
         client_print( id, print_chat, "Ai primit Teleport!" );
         client_print( id, print_chat, "Aceasta putere poate fi folosita odata la 20 secunde." );
	 
	 	remove_task(id);
	if(Teleport_Cooldown[id]) {
	TeleportShowHUD(id);
	}
      }
   }
   return PLUGIN_HANDLED
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GodMode |
//==========================================================================================================	
public GodModeShowHUD(id) {
	if (!is_user_alive(id) || !g_bGM[id]) {
	remove_task(id);
	GodMode_DurationCooldown[id] = 0;
	set_user_godmode(id, 0);
	return PLUGIN_HANDLED;
	}
	set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
	if(is_user_alive(id) && GodMode_DurationCooldown[id] == 1) {
	GodMode_DurationCooldown[id] --;
	show_hudmessage(id, "Ai GodMode pentru: %d secunda",GodMode_DurationCooldown[id]);
	}
	if(is_user_alive(id) && GodMode_DurationCooldown[id] > 1) {
	GodMode_DurationCooldown[id] --;
	show_hudmessage(id, "Ai GodMode pentru: %d secunde",GodMode_DurationCooldown[id]);
	}
	if(GodMode_DurationCooldown[id] <= 0) {
	show_hudmessage(id, "Nu mai ai GodMode");
	ColorChat(id,"^x03[AMXX]^x04 Nu mai ai GodMode.");
	remove_task(id);
	set_user_godmode(id, 0);
	GodMode_DurationCooldown[id] = 0;
	GodMode_Cooldown[id] = get_pcvar_num(CvarGodModeCooldown);
	set_task(1.0, "GodModeShowHUD2", id, _, _, "b");
	set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
	if(get_pcvar_num(CvarGodModeCooldown) != 1) {
	show_hudmessage(id, "Puterea GodMode iti va reveni in: %d secunde",get_pcvar_num(CvarGodModeCooldown));
	}
	if(get_pcvar_num(CvarGodModeCooldown) == 1) {
	show_hudmessage(id, "Puterea GodMode iti va reveni in: %d secunda",get_pcvar_num(CvarGodModeCooldown));
	}
	return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
	}
	
public GodModeShowHUD2(id) {
	if (!is_user_alive(id) || !g_bGM[id]) {
	remove_task(id);
	GodMode_Cooldown[id] = 0;
	return PLUGIN_HANDLED;
	}
	set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
	if(is_user_alive(id) && GodMode_Cooldown[id] == 1) {
	GodMode_Cooldown[id] --;
	show_hudmessage(id, "Puterea GodMode iti va reveni in: %d secunda",GodMode_Cooldown[id]);
	}
	if(is_user_alive(id) && GodMode_Cooldown[id] > 1) {
	GodMode_Cooldown[id] --;
	show_hudmessage(id, "Puterea GodMode iti va reveni in: %d secunde",GodMode_Cooldown[id]);
	}
	if(GodMode_Cooldown[id] <= 0) {
	show_hudmessage(id, "Ti-a revenit puterea GodMode");
	ColorChat(id,"^x03[AMXX]^x04 Iti poti folosi din nou puterea GodMode.");
	remove_task(id);
	GodMode_Cooldown[id] = 0;
	}
	return PLUGIN_HANDLED;
	}
	
	
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Teleport |
//==========================================================================================================
public TeleportShowHUD(id) {
	if (!is_user_alive(id) || !g_bTeleport[id]) {
	remove_task(id);
	Teleport_Cooldown[id] = 0;
	return PLUGIN_HANDLED;
	}
	set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
	if(is_user_alive(id) && Teleport_Cooldown[id] == 1) {
	Teleport_Cooldown[id] --;
	show_hudmessage(id, "Puterea Teleport iti va reveni in: %d secunda",Teleport_Cooldown[id]);
	}
	if(is_user_alive(id) && Teleport_Cooldown[id] > 1) {
	Teleport_Cooldown[id] --;
	show_hudmessage(id, "Puterea Teleport iti va reveni in: %d secunde",Teleport_Cooldown[id]);
	}
	if(Teleport_Cooldown[id] <= 0) {
	show_hudmessage(id, "Ti-a revenit puterea de Teleport");
	ColorChat(id,"^x03[AMXX]^x04 Iti poti folosi din nou puterea de Teleport.");
	remove_task(id);
	Teleport_Cooldown[id] = 0;
	}
	return PLUGIN_HANDLED;
	}
bool:teleport(id) {
	new Float:vOrigin[3], Float:vNewOrigin[3],
	Float:vNormal[3], Float:vTraceDirection[3],
	Float:vTraceEnd[3];
	
	pev(id, pev_origin, vOrigin);
	
	velocity_by_aim(id, get_pcvar_num(CvarTeleportRange), vTraceDirection);
	xs_vec_add(vTraceDirection, vOrigin, vTraceEnd);
	
	engfunc(EngFunc_TraceLine, vOrigin, vTraceEnd, DONT_IGNORE_MONSTERS, id, 0);
	
	new Float:flFraction;
	get_tr2(0, TR_flFraction, flFraction);
	if (flFraction < 1.0) {
	get_tr2(0, TR_vecEndPos, vTraceEnd);
	get_tr2(0, TR_vecPlaneNormal, vNormal);
	}
	
	xs_vec_mul_scalar(vNormal, 40.0, vNormal); // do not decrease the 40.0
	xs_vec_add(vTraceEnd, vNormal, vNewOrigin);
	
	if (is_player_stuck(id, vNewOrigin))
	return false;
	
	emit_sound(id, CHAN_STATIC, SOUND_BLINK, 1.0, ATTN_NORM, 0, PITCH_NORM);
	tele_effect(vOrigin);
	
	engfunc(EngFunc_SetOrigin, id, vNewOrigin);
	
	tele_effect2(vNewOrigin);
	
	return true;
	}

stock is_player_stuck(id, Float:originF[3]) {
	engfunc(EngFunc_TraceHull, originF, originF, 0, (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN, id, 0);
	
	if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
	return true;
	
	return false;
	}

stock tele_effect(const Float:torigin[3]) {
	new origin[3];
	origin[0] = floatround(torigin[0]);
	origin[1] = floatround(torigin[1]);
	origin[2] = floatround(torigin[2]);
	
	message_begin(MSG_PAS, SVC_TEMPENTITY, origin);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]+10);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]+60);
	write_short(TeleportSprite);
	write_byte(0);
	write_byte(0);
	write_byte(3);
	write_byte(60);
	write_byte(0);
	write_byte(255);
	write_byte(255);
	write_byte(255);
	write_byte(255);
	write_byte(0);
	message_end();
	}

stock tele_effect2(const Float:torigin[3]) {
	new origin[3];
	origin[0] = floatround(torigin[0]);
	origin[1] = floatround(torigin[1]);
	origin[2] = floatround(torigin[2]);
	
	message_begin(MSG_PAS, SVC_TEMPENTITY, origin);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]+10);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]+60);
	write_short(TeleportSprite);
	write_byte(0);
	write_byte(0);
	write_byte(3);
	write_byte(60);
	write_byte(0);
	write_byte(255);
	write_byte(255);
	write_byte(255);
	write_byte(255);
	write_byte(0);
	message_end();
	
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_SPRITETRAIL);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]+40);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]);
	write_short(TeleportSprite2);
	write_byte(30);
	write_byte(10);
	write_byte(1);
	write_byte(50);
	write_byte(10);
	message_end();
	}
	
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Color Chat |
//==========================================================================================================
stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
 
	replace_all(msg, 190, "^x04", "^4");
	replace_all(msg, 190, "^x01", "^1");
	replace_all(msg, 190, "^x03", "^3");
 
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
	for(new i = 0; i < count; i++) {
	if(is_user_connected(players)) {
	message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
	write_byte(players);
	write_string(msg);
	message_end();
	}
	}
	}
	}[/code]
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
* Inactiv momentan.
Djjfurien
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 05 Jan 2019, 21:49
Detinator Steam: Da
CS Status: Furien.Indungi.Ro # XP FURIEN MOD
Detinator server CS: Da
SteamID: privat
Fond eXtream: 0
Location: Neamt
Contact:

02 Feb 2019, 19:41

Functionabil! Daca mai am nevoie de ceva modificari, ti-as putea lasa PM, daca inchizi topicul!

Multumesc!

EDIT: o problema.. Cand dau /vip, si iau godmode, se activeaza fara sa apas eu pe vreo tasta sa l activez.. si tine mereu, non stop. Se poate rezolva ?
Djjfurien
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 05 Jan 2019, 21:49
Detinator Steam: Da
CS Status: Furien.Indungi.Ro # XP FURIEN MOD
Detinator server CS: Da
SteamID: privat
Fond eXtream: 0
Location: Neamt
Contact:

03 Feb 2019, 22:40

:up: :up: :up: UP
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2155
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 348 times
Contact:

04 Feb 2019, 00:26

| Afiseaza codul
[code]
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include <fakemeta_util>
#include < fun >
#include < xs >
#include <hamsandwich>
#include <engine>

#pragma tabsize 0

new bool:g_bTeleport[ 33 ],bool:g_bGM[ 33 ]

//--| GodMode |--//
new GodMode_Cooldown[33] = 0;
new GodMode_DurationCooldown[33] = 0;
//--| Teleport |--//
new TeleportSprite, TeleportSprite2;
new Teleport_Cooldown[33];
new const SOUND_BLINK[] = { "weapons/flashbang-1.wav" };
const UNIT_SEC = 0x1000;
const FFADE = 0x0000;
new CvarTeleportCooldown, CvarTeleportRange,CvarGodModeCooldown, CvarGodModeDuration

new const VIP_DIR[]=   "addons/amxmodx/configs/VIP"
new const VIP_FILE[]=   "vips.ini"

new File[125],bool:IsUserVip[33] = false,Trie:LoadVip

public plugin_init( ) 
{
   register_event( "HLTV", "event_new_round", "a", "1=0", "2=0" );
   register_event("DeathMsg", "Death", "a");
   
   RegisterHam(Ham_Spawn, "player", "Spawn", 1);
   
   register_clcmd( "say", "SayChatAnswer" );
   register_clcmd( "say_team", "SayChatAnswer" );
   
register_clcmd("power", "Power");
   
   LoadVip = TrieCreate()
   
    CvarTeleportCooldown = register_cvar("vip_teleport_cooldown", "20.0");   // Teleport Cooldown
   CvarTeleportRange = register_cvar("vip_teleport_range", "12345");   // Teleport Range
   
   CvarGodModeCooldown = register_cvar("vip_godmode_cooldown", "20.0");   // GodMode Cooldown
   CvarGodModeDuration = register_cvar("vip_godmode_duration", "3.0");   // GodMode Duration
}

public plugin_precache()
{
   if(!dir_exists(VIP_DIR))   mkdir(VIP_DIR)
   
      TeleportSprite = precache_model( "sprites/shockwave.spr");
   TeleportSprite2 = precache_model( "sprites/blueflare2.spr");
}

public plugin_cfg()
{
   formatex(File,charsmax(File),"%s/%s",VIP_DIR, VIP_FILE)
   if(!file_exists (File))
   {
      write_file (File,"; ===========================================================");
      write_file (File,"; --------------------- VIP LIST ----------------------------");
      write_file (File,"; ===========================================================");
      write_file (File,"; Nota: Incepe randul cu ; pentru a dezactiva un VIP");
      write_file (File,"; Nota: Pentru a adauga un nume cu spatiu, pune-l intre ^"^"");
   }
   
   new FilePointer,Key[32],FileData[256]
   FilePointer = fopen(File,"rt")
   /*if(!file_exists(File))
{
   FilePointer = fopen(File,"w")
   fclose(FilePointer)
}*/
   if(FilePointer)
   {
      while(!feof(FilePointer))//fgets
      {
         //trim(FileData)
         fgets(FilePointer,FileData,charsmax(FileData))
         if ( !strlen (FileData) || FileData[0] == ';' )   continue;
         parse(FileData,Key,charsmax(Key))
         TrieSetCell(LoadVip,Key,charsmax(Key))
      }
      fclose(FilePointer)
   }
}

public client_connect(id) {
   new szName[32]
   get_user_name(id,szName,charsmax(szName))

   if(TrieKeyExists(LoadVip,szName))   IsUserVip[id] = true
}
public client_infochanged(id) {
   new oldname[32],newname[32]
   get_user_name(id,oldname,charsmax(oldname))
   get_user_info(id,"name",newname,charsmax(newname))

   if(equal(newname,oldname))   return
   
   if(TrieKeyExists(LoadVip,newname))   IsUserVip[id] = true
   else   IsUserVip[id] = false
}
public plugin_end()   TrieDestroy(LoadVip)

//------| Client Power |------//
public Power(id)  {
   static Float:start[3];
   static Float:aim[3];

   pev(id, pev_origin, start);
   fm_get_aim_origin(id, aim);

   start[2] += 16.0; // raise
   aim[2] += 16.0; // raise
   
   if (IsUserVip[id]&& is_user_alive(id) && g_bGM[id] && !GodMode_DurationCooldown[id]) {

   if (GodMode_Cooldown[id]) {
   ColorChat(id,"^x03[AMXX]^x04 Puterea GodMode iti va reveni in^x03 %d secunde.",GodMode_Cooldown[id]);
set_user_godmode(id, 0);
   return PLUGIN_HANDLED;
   }
   else
   {
   set_user_godmode(id, 1);
   GodMode_DurationCooldown[id] = get_pcvar_num(CvarGodModeDuration)
   set_task(1.0, "GodModeShowHUD", id, _, _, "b");
   set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
   if(get_pcvar_num(CvarGodModeDuration) != 1) {
   show_hudmessage(id, "Ai GodMode pentru: %d secunde",get_pcvar_num(CvarGodModeDuration));
   }
   else if(get_pcvar_num(CvarGodModeDuration) == 1) {
   show_hudmessage(id, "Ai GodMode pentru: %d secunda",get_pcvar_num(CvarGodModeDuration));
   }
   return PLUGIN_HANDLED;
   }
   }

   else if  (IsUserVip[id] && is_user_alive(id) && g_bTeleport[id]) {   
   if (Teleport_Cooldown[id]) {
   ColorChat(id,"^x03[AMXX]^x04 Puterea Teleport iti va reveni in^x03 %d secunde.",Teleport_Cooldown[id]);
   return PLUGIN_CONTINUE;
   }
   if (teleport(id)) {
   emit_sound(id, CHAN_STATIC, SOUND_BLINK, 1.0, ATTN_NORM, 0, PITCH_NORM);
   remove_task(id);
   Teleport_Cooldown[id] = get_pcvar_num(CvarTeleportCooldown);
   set_task(1.0, "TeleportShowHUD", id, _, _, "b");
   set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
   if(get_pcvar_num(CvarTeleportCooldown) != 1) {
   show_hudmessage(id, "Puterea Teleport iti va reveni in: %d secunde",get_pcvar_num(CvarTeleportCooldown));
   }
   if(get_pcvar_num(CvarTeleportCooldown) == 1) {
   show_hudmessage(id, "Puterea Teleport iti va reveni in: %d secunda",get_pcvar_num(CvarTeleportCooldown));
   }
   return PLUGIN_HANDLED;
   }
   else {
   Teleport_Cooldown[id] = 0;
   ColorChat(id, "^x03[AMXX]^x04 Pozitia de teleportare este invalida.");
   return PLUGIN_HANDLED;
   }
   return PLUGIN_HANDLED;
   }
   return PLUGIN_HANDLED;
   }

////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Client |
//==========================================================================================================
//------| Client PutinServer |------//
public client_putinserver(id) {
   GodMode_Cooldown[id] = 0;
   GodMode_DurationCooldown[id] = 0;
   Teleport_Cooldown[id] = 0;
   }
//------| Client Disconnect |------//
public client_disconnect(id) {  
   GodMode_Cooldown[id] = 0;
   GodMode_DurationCooldown[id] = 0;
   Teleport_Cooldown[id] = 0;
   
   IsUserVip[id] = false
   }
//------| Client Spawn |------//   
public Spawn(id) {
   remove_task(id);
   GodMode_Cooldown[id] = 0;
   GodMode_DurationCooldown[id] = 0;
   Teleport_Cooldown[id] = 0;
   }
//------| Client Death |------//
public Death() {
   remove_task(read_data(2));
   GodMode_Cooldown[read_data(2)] = 0;
   GodMode_DurationCooldown[read_data(2)] = 0;
   
   Teleport_Cooldown[read_data(2)] = 0;
   }
//------| Client Power |------//

public event_new_round()
{
   for(new id;id<=get_maxplayers();id++)
   {
      g_bGM[id]=false
      g_bTeleport[id]=false
   }
}

public SayChatAnswer( id )
{
   new szSaid[ 132 ];
   read_args( szSaid, sizeof ( szSaid ) - 1 );
   remove_quotes( szSaid );
   
   if ( contain( szSaid, "/vip" )!=-1 || contain( szSaid, "/vips" )!=-1 )
   {
      if(IsUserVip[id])
      {
         ShowMenuVIP( id );
         client_print(id,print_chat,"Ai deschis meniul VIP Premium.")
      }
      else
      {
         client_print(id,print_chat,"Doar VIP-II Premium au acces la aceasta comanda.")
      }
   }
}
public ShowMenuVIP( id )
{
   new szMenu;
   szMenu = menu_create( "\rMeniu VIP Premium:\w", "iContent" );
   
   menu_additem( szMenu, "\wTeleport",    "2" );
   menu_additem( szMenu, "\wGodMode",    "1" );
   
   menu_setprop( szMenu, MPROP_NUMBER_COLOR, "\r" );
   menu_setprop( szMenu, MPROP_EXIT, MEXIT_ALL );
   menu_display( id, szMenu, 0 );
}
public iContent( id, szMenu, Item )
{
   if ( Item == MENU_EXIT||!is_user_alive(id) )
   {
      menu_destroy( szMenu )
      return PLUGIN_HANDLED;
   }
   
   new iData[ 9 ], szName[ 32 ];
   new iAccess, iCallback;
   menu_item_getinfo( szMenu, Item, iAccess, iData, sizeof ( iData ) - 1, szName, sizeof ( szName ) - 1, iCallback );
   
   new iKeys = str_to_num( iData );
   switch( iKeys )
   {
      case 1:
      {
         if(g_bGM[id]||g_bTeleport[id])   return PLUGIN_HANDLED
         
         g_bGM[id]=true
         //set_user_godmode(id,1)
         
         client_print( id, print_chat, "Ai primit GodMode!" );
         client_print(id,print_chat,"Aceasta putere poate fi folosita odata la 20 secunde.")
    
   remove_task(id);
   if(GodMode_Cooldown[id]) {
   GodModeShowHUD2(id);
   }
      }
      
      case 2:
      {
         if(g_bTeleport[id]||g_bGM[id])   return PLUGIN_HANDLED

         g_bTeleport[ id ]  = true;
         
         client_print( id, print_chat, "Ai primit Teleport!" );
         client_print( id, print_chat, "Aceasta putere poate fi folosita odata la 20 secunde." );
    
       remove_task(id);
   if(Teleport_Cooldown[id]) {
   TeleportShowHUD(id);
   }
      }
   }
   return PLUGIN_HANDLED
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GodMode |
//==========================================================================================================   
public GodModeShowHUD(id) {
   if (!is_user_alive(id) || !g_bGM[id]) {
   remove_task(id);
   GodMode_DurationCooldown[id] = 0;
   set_user_godmode(id, 0);
   return PLUGIN_HANDLED;
   }
   set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
   if(is_user_alive(id) && GodMode_DurationCooldown[id] == 1) {
   GodMode_DurationCooldown[id] --;
   show_hudmessage(id, "Ai GodMode pentru: %d secunda",GodMode_DurationCooldown[id]);
   }
   if(is_user_alive(id) && GodMode_DurationCooldown[id] > 1) {
   GodMode_DurationCooldown[id] --;
   show_hudmessage(id, "Ai GodMode pentru: %d secunde",GodMode_DurationCooldown[id]);
   }
   if(GodMode_DurationCooldown[id] <= 0) {
   show_hudmessage(id, "Nu mai ai GodMode");
   ColorChat(id,"^x03[AMXX]^x04 Nu mai ai GodMode.");
   remove_task(id);
   set_user_godmode(id, 0);
   GodMode_DurationCooldown[id] = 0;
   GodMode_Cooldown[id] = get_pcvar_num(CvarGodModeCooldown);
   set_task(1.0, "GodModeShowHUD2", id, _, _, "b");
   set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
   if(get_pcvar_num(CvarGodModeCooldown) != 1) {
   show_hudmessage(id, "Puterea GodMode iti va reveni in: %d secunde",get_pcvar_num(CvarGodModeCooldown));
   }
   if(get_pcvar_num(CvarGodModeCooldown) == 1) {
   show_hudmessage(id, "Puterea GodMode iti va reveni in: %d secunda",get_pcvar_num(CvarGodModeCooldown));
   }
   return PLUGIN_HANDLED;
   }
   return PLUGIN_HANDLED;
   }
   
public GodModeShowHUD2(id) {
   if (!is_user_alive(id) || !g_bGM[id]) {
   remove_task(id);
   GodMode_Cooldown[id] = 0;
   return PLUGIN_HANDLED;
   }
   set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
   if(is_user_alive(id) && GodMode_Cooldown[id] == 1) {
   GodMode_Cooldown[id] --;
   show_hudmessage(id, "Puterea GodMode iti va reveni in: %d secunda",GodMode_Cooldown[id]);
   }
   if(is_user_alive(id) && GodMode_Cooldown[id] > 1) {
   GodMode_Cooldown[id] --;
   show_hudmessage(id, "Puterea GodMode iti va reveni in: %d secunde",GodMode_Cooldown[id]);
   }
   if(GodMode_Cooldown[id] <= 0) {
   show_hudmessage(id, "Ti-a revenit puterea GodMode");
   ColorChat(id,"^x03[AMXX]^x04 Iti poti folosi din nou puterea GodMode.");
   remove_task(id);
   GodMode_Cooldown[id] = 0;
   }
   return PLUGIN_HANDLED;
   }
   
   
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Teleport |
//==========================================================================================================
public TeleportShowHUD(id) {
   if (!is_user_alive(id) || !g_bTeleport[id]) {
   remove_task(id);
   Teleport_Cooldown[id] = 0;
   return PLUGIN_HANDLED;
   }
   set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11);
   if(is_user_alive(id) && Teleport_Cooldown[id] == 1) {
   Teleport_Cooldown[id] --;
   show_hudmessage(id, "Puterea Teleport iti va reveni in: %d secunda",Teleport_Cooldown[id]);
   }
   if(is_user_alive(id) && Teleport_Cooldown[id] > 1) {
   Teleport_Cooldown[id] --;
   show_hudmessage(id, "Puterea Teleport iti va reveni in: %d secunde",Teleport_Cooldown[id]);
   }
   if(Teleport_Cooldown[id] <= 0) {
   show_hudmessage(id, "Ti-a revenit puterea de Teleport");
   ColorChat(id,"^x03[AMXX]^x04 Iti poti folosi din nou puterea de Teleport.");
   remove_task(id);
   Teleport_Cooldown[id] = 0;
   }
   return PLUGIN_HANDLED;
   }
bool:teleport(id) {
   new Float:vOrigin[3], Float:vNewOrigin[3],
   Float:vNormal[3], Float:vTraceDirection[3],
   Float:vTraceEnd[3];
   
   pev(id, pev_origin, vOrigin);
   
   velocity_by_aim(id, get_pcvar_num(CvarTeleportRange), vTraceDirection);
   xs_vec_add(vTraceDirection, vOrigin, vTraceEnd);
   
   engfunc(EngFunc_TraceLine, vOrigin, vTraceEnd, DONT_IGNORE_MONSTERS, id, 0);
   
   new Float:flFraction;
   get_tr2(0, TR_flFraction, flFraction);
   if (flFraction < 1.0) {
   get_tr2(0, TR_vecEndPos, vTraceEnd);
   get_tr2(0, TR_vecPlaneNormal, vNormal);
   }
   
   xs_vec_mul_scalar(vNormal, 40.0, vNormal); // do not decrease the 40.0
   xs_vec_add(vTraceEnd, vNormal, vNewOrigin);
   
   if (is_player_stuck(id, vNewOrigin))
   return false;
   
   emit_sound(id, CHAN_STATIC, SOUND_BLINK, 1.0, ATTN_NORM, 0, PITCH_NORM);
   tele_effect(vOrigin);
   
   engfunc(EngFunc_SetOrigin, id, vNewOrigin);
   
   tele_effect2(vNewOrigin);
   
   return true;
   }

stock is_player_stuck(id, Float:originF[3]) {
   engfunc(EngFunc_TraceHull, originF, originF, 0, (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN, id, 0);
   
   if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
   return true;
   
   return false;
   }

stock tele_effect(const Float:torigin[3]) {
   new origin[3];
   origin[0] = floatround(torigin[0]);
   origin[1] = floatround(torigin[1]);
   origin[2] = floatround(torigin[2]);
   
   message_begin(MSG_PAS, SVC_TEMPENTITY, origin);
   write_byte(TE_BEAMCYLINDER);
   write_coord(origin[0]);
   write_coord(origin[1]);
   write_coord(origin[2]+10);
   write_coord(origin[0]);
   write_coord(origin[1]);
   write_coord(origin[2]+60);
   write_short(TeleportSprite);
   write_byte(0);
   write_byte(0);
   write_byte(3);
   write_byte(60);
   write_byte(0);
   write_byte(255);
   write_byte(255);
   write_byte(255);
   write_byte(255);
   write_byte(0);
   message_end();
   }

stock tele_effect2(const Float:torigin[3]) {
   new origin[3];
   origin[0] = floatround(torigin[0]);
   origin[1] = floatround(torigin[1]);
   origin[2] = floatround(torigin[2]);
   
   message_begin(MSG_PAS, SVC_TEMPENTITY, origin);
   write_byte(TE_BEAMCYLINDER);
   write_coord(origin[0]);
   write_coord(origin[1]);
   write_coord(origin[2]+10);
   write_coord(origin[0]);
   write_coord(origin[1]);
   write_coord(origin[2]+60);
   write_short(TeleportSprite);
   write_byte(0);
   write_byte(0);
   write_byte(3);
   write_byte(60);
   write_byte(0);
   write_byte(255);
   write_byte(255);
   write_byte(255);
   write_byte(255);
   write_byte(0);
   message_end();
   
   message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
   write_byte(TE_SPRITETRAIL);
   write_coord(origin[0]);
   write_coord(origin[1]);
   write_coord(origin[2]+40);
   write_coord(origin[0]);
   write_coord(origin[1]);
   write_coord(origin[2]);
   write_short(TeleportSprite2);
   write_byte(30);
   write_byte(10);
   write_byte(1);
   write_byte(50);
   write_byte(10);
   message_end();
   }
   
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Color Chat |
//==========================================================================================================
stock ColorChat(const id, const input[], any:...) {
   new count = 1, players[32];
   static msg[191];
   vformat(msg, 190, input, 3);
 
   replace_all(msg, 190, "^x04", "^4");
   replace_all(msg, 190, "^x01", "^1");
   replace_all(msg, 190, "^x03", "^3");
 
   if(id) players[0] = id;
   else get_players(players, count, "ch"); {
   for(new i = 0; i < count; i++) {
   if(is_user_connected(players)) {
   message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
   write_byte(players);
   write_string(msg);
   message_end();
   }
   }
   }
   }[/code]
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
* Inactiv momentan.
Djjfurien
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 05 Jan 2019, 21:49
Detinator Steam: Da
CS Status: Furien.Indungi.Ro # XP FURIEN MOD
Detinator server CS: Da
SteamID: privat
Fond eXtream: 0
Location: Neamt
Contact:

04 Feb 2019, 10:51

Functional, in caz de mai sunt probleme, voi lasa reply aici daca nu se inchide topicul. Daca se inchide, te caut in PM.
User avatar
Rainq
Manager ZM
Manager ZM
Posts: 2587
Joined: 21 Jul 2015, 18:50
Detinator Steam: Da
CS Status: Busy
Detinator server CS: ---
Reputatie: Fost moderator
Manager ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucuresti
Been thanked: 10 times
Contact:

04 Feb 2019, 13:22

Djjfurien wrote:Functional, in caz de mai sunt probleme, voi lasa reply aici daca nu se inchide topicul. Daca se inchide, te caut in PM.
topicurile nu se inchid :) asa ca poti lasa reply daca a mers sau nu.
RETRAS
Image
Leul si tigru sunt mai puternici ca lupul,dar lupul la circ nu participa.
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests