|
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
|
03-31-2017
, 05:19
Re: [CS:GO] Hide new arms?
|
#201
|
Than do something like this on infection :
Quote:
CreateTimer(0.15, RemoveItemTimer, EntIndexToEntRef(client), TIMER_FLAG_NO_MAPCHANGE);
|
Quote:
public Action RemoveItemTimer(Handle timer ,any ref)
{
int client = EntRefToEntIndex(ref);
if (client != INVALID_ENT_REFERENCE)
{
int item = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
if (item > 0)
{
RemovePlayerItem(client, item);
Handle ph=CreateDataPack();
WritePackCell(ph, EntIndexToEntRef(client));
WritePackCell(ph, EntIndexToEntRef(item));
CreateTimer(0.15 , AddItemTimer, ph, TIMER_FLAG_NO_MAPCHANGE);
}
}
}
public Action AddItemTimer(Handle timer ,any ph)
{
int client, item;
ResetPack(ph);
client = EntRefToEntIndex(ReadPackCell(ph));
item = EntRefToEntIndex(ReadPackCell(ph));
if (client != INVALID_ENT_REFERENCE && item != INVALID_ENT_REFERENCE)
{
EquipPlayerWeapon(client, item);
}
}
|
__________________
Last edited by andi67; 03-31-2017 at 05:20.
|
|
|
|