It is currently 19 Dec 2018 18:28





Reply to topic  [ 3 posts ] 
 Modificare laserz 
Author Message
Online
Membru, skill +1
Membru, skill +1
User avatar

Joined: 12 Sep 2017 16:41
Posts: 209
Location: Piatra Neamt
Detinator Steam: Da
CS Status: Groh!
Detinator server CS: RETAKE.EVICT.RO
SteamID: STEAM_0:0:102123053
Fond eXtream: 0
Salut! Ar putea sa imi modifice cineva sursa acestui plugin. Noutatea sa zic asa pe care as vrea-o la acesta este sa nu poti desena cat timp esti mort.
Sursa: https://forums.alliedmods.net/showthread.php?p=1749220

_________________
Image


10 Jul 2018 09:19
Profile multumesc WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 11 Jun 2017 16:07
Posts: 59
Location: Bascauti
Detinator Steam: Da
CS Status: :/
Detinator server CS: xd.rinkau.ro
SteamID: STEAM_0:1:208463495
Fond eXtream: 0
| Afiseaza codul
#include <sourcemod>
#include <sdktools>
public Plugin:myinfo =
{
name = "Laserz Edited!",
author = "MitchDizzle_",
description = "Mitch's lazer print on wall stuff plugin cheese!",
version = "1.1",
url = "http://forums.alliedmods.net/showthread.php?t=189956"
}
new const g_DefaultColors_c[7][4] = { {255,255,255,255}, {255,0,0,255}, {0,255,0,255}, {0,0,255,255}, {255,255,0,255}, {0,255,255,255}, {255,0,255,255} };
new Float:LastLaser[MAXPLAYERS+1][3];
new bool:LaserE[MAXPLAYERS+1] = {false, ...};
new g_sprite;

public OnPluginStart()
{
RegAdminCmd("+sm_laser", CMD_laser_p, ADMFLAG_BAN);
RegAdminCmd("-sm_laser", CMD_laser_m, ADMFLAG_BAN);
RegAdminCmd("+laser", CMD_laser_p, ADMFLAG_BAN);
RegAdminCmd("-laser", CMD_laser_m, ADMFLAG_BAN);
}

public OnMapStart()
{
g_sprite = PrecacheModel("materials/sprites/laserbeam.vmt");
for(new r = 1; r <= MaxClients; r++)
{
if(IsPlayerAlive(r))
{
CreateTimer(0.1, Timer_Pay, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}
}
}

public OnClientPutInServer(client)
{
LaserE[client] = false;
LastLaser[client][0] = 0.0;
LastLaser[client][1] = 0.0;
LastLaser[client][2] = 0.0;
}

public Action:Timer_Pay(Handle:timer)
{
new Float:pos[3];
new Color = GetRandomInt(0,6);
for(new r = 1; r <= MaxClients; r++)
{
if(IsClientInGame(r) && LaserE[r])
{
TraceEye(r, pos);
if(GetVectorDistance(pos, LastLaser[r]) > 6.0)
{
LaserP(LastLaser[r], pos, g_DefaultColors_c[Color]);
LastLaser[r][0] = pos[0];
LastLaser[r][1] = pos[1];
LastLaser[r][2] = pos[2];
}
}
}
}

public Action:CMD_laser_p(client, args)
{
if(IsPlayerAlive(client))
{
TraceEye(client, LastLaser[client]);
LaserE[client] = true;
}
return Plugin_Handled;
}

public Action:CMD_laser_m(client, args)
{
LastLaser[client][0] = 0.0;
LastLaser[client][1] = 0.0;
LastLaser[client][2] = 0.0;
LaserE[client] = false;
return Plugin_Handled;
}

stock LaserP(Float:start[3], Float:end[3], color[4])
{
TE_SetupBeamPoints(start, end, g_sprite, 0, 0, 0, 25.0, 2.0, 2.0, 10, 0.0, color, 0);
TE_SendToAll();
}

TraceEye(client, Float:pos[3])
{
decl Float:vAngles[3], Float:vOrigin[3];
GetClientEyePosition(client, vOrigin);
GetClientEyeAngles(client, vAngles);
TR_TraceRayFilter(vOrigin, vAngles, MASK_SHOT, RayType_Infinite, TraceEntityFilterPlayer);
if(TR_DidHit(INVALID_HANDLE)) TR_GetEndPosition(pos, INVALID_HANDLE);
return;
}

public bool:TraceEntityFilterPlayer(entity, contentsMask)
{
return (entity > GetMaxClients() || !entity);
}


10 Jul 2018 09:57
Profile multumesc YIM WWW
Online
Membru, skill +1
Membru, skill +1
User avatar

Joined: 12 Sep 2017 16:41
Posts: 209
Location: Piatra Neamt
Detinator Steam: Da
CS Status: Groh!
Detinator server CS: RETAKE.EVICT.RO
SteamID: STEAM_0:0:102123053
Fond eXtream: 0
Multumesc :hearts: :white_check_mark:

_________________
Image


10 Jul 2018 10:21
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: Dani2712, Luna24 and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group