Raised This Month: $ Target: $400
 0% 

how can I make all players invisible when they spawn?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
prolge
New Member
Join Date: Jun 2023
Old 06-23-2023 , 22:54   how can I make all players invisible when they spawn?
Reply With Quote #1

how can I make all players invisible when they spawn?
I want to insert invisibility script in this IF

#include <sourcemod>
#include <sdktools>
public OnPluginStart()
{
HookEvent("player_spawn", Event_playerS);
}
public Event_playerS(Event hEvent, const char[] sEvName, bool bDontBroadcast)
{
int iUserID = hEvent.GetInt("userid");
int iClient = GetClientOfUserId(iUserID);
if(iClient)
{
GivePlayerItem(iClient, "weapon_hegrenade");
SetEntityHealth(iClient, 1);
[code here]
}
}
prolge is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 06-23-2023 , 23:27   Re: how can I make all players invisible when they spawn?
Reply With Quote #2

search for:


Hook SetTransmit

or

SetEntityRenderMode(entity, RENDER_TRANSCOLOR);
SetEntityRenderColor(entity, 0, 0, 0, 0);
__________________

Last edited by Marttt; 06-23-2023 at 23:27.
Marttt 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 05:48.


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