Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <cstrike>
- #include <sdkhooks>
- #include <sdktools>
- public Plugin:myinfo =
- {
- name = "nazwa",
- author = "xx`",
- description = "xxxx ",
- version = "1.0",
- url = "xx"
- };
- new sprite_beam,
- sprite_halo;
- public OnPluginStart()
- {
- HookEvent("player_spawn", OdrodzenieGracza);
- }
- public OnMapStart()
- {
- sprite_beam = PrecacheModel("sprites/laserbeam.vmt");
- sprite_halo = PrecacheModel("sprites/glow01.vmt");
- }
- public Action:OdrodzenieGracza(Handle:event, String:name[], bool:dontBroadcast)
- {
- new client = GetClientOfUserId(GetEventInt(event, "userid"));
- if(!IsPlayerAlive(client))
- return Plugin_Continue;
- if (GetClientTeam(client) == 2)
- {
- SetEntityRenderMode(client, RENDER_TRANSCOLOR);
- SetEntityRenderColor(client, 255, 0, 0, 255);
- CreateTimer(0.1, BeaconTT, client);
- }
- else if (GetClientTeam(client) == 3)
- {
- SetEntityRenderMode(client, RENDER_TRANSCOLOR);
- SetEntityRenderColor(client, 0, 255, 0, 255);
- CreateTimer(0.1, BeaconCT, client);
- }
- return Plugin_Continue;
- }
- public Action:BeaconCT(Handle: timer, any client)
- {
- if(IsPlayerAlive(client))
- {
- new Float:odleglosc_gracza = 70.0;
- new Float:forigin[3];
- GetClientEyePosition(client, forigin);
- TE_SetupBeamRingPoint(forigin, 20.0, odleglosc_gracza, sprite_beam, sprite_halo, 0, 10, 0.6, 2.5, 0.0, {0, 255, 0, 170}, 10, 0);
- TE_SendToAll();
- CreateTimer(3.0, BeaconCT, client);
- }
- return Plugin_Continue;
- }
- public Action:BeaconTT(Handle: timer1, any client)
- {
- if(IsPlayerAlive(client))
- {
- new Float:odleglosc_gracza = 70.0;
- new Float:forigin[3];
- GetClientEyePosition(client, forigin);
- TE_SetupBeamRingPoint(forigin, 20.0, odleglosc_gracza, sprite_beam, sprite_halo, 0, 10, 0.6, 2.5, 0.0, {255, 0, 0, 170}, 10, 0);
- TE_SendToAll();
- CreateTimer(3.0, BeaconTT, client);
- }
- return Plugin_Continue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement