Is there anyone able to change the code to let the GivePlayerItem allocate things delayed by the timer
PHP Code:
public Action PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(GetEventInt(event, "userid"));
if(!IsPlayerVIP(client)) return;
if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0)
SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0)
SetEntProp(client, Prop_Send, "m_bHasHelmet", 1);
int money = GetEntProp(client, Prop_Send, "m_iAccount");
if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0)
SetEntProp(client, Prop_Send, "m_iAccount", money+200);
if(GetClientTeam(client) == CS_TEAM_CT)
if(GetEntProp(client, Prop_Send, "m_bHasDefuser") == 0) GivePlayerItem(client, "item_defuser");
for(int x = 0; x < 1; x++)
if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0)
if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetHe) < 1) GivePlayerItem(client, "weapon_hegrenade");
for(int x = 0; x < 1; x++)
if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0)
if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetFlash) < 1) GivePlayerItem(client, "weapon_flashbang");
for(int x = 0; x < 1; x++)
if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0)
if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetSmoke) < 1) GivePlayerItem(client, "weapon_smokegrenade");
if(GetClientTeam(client) == CS_TEAM_CT)
{
for(int x = 0; x < 1; x++) // ilosc inc
if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0)
if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetInc) < 1) GivePlayerItem(client, "weapon_incgrenade");
}
else if(GetClientTeam(client) == CS_TEAM_T)
{
for(int x = 0; x < 1; x++)
if(GetTeamScore(CS_TEAM_CT) + GetTeamScore(CS_TEAM_T) != 0)
if(GetEntProp(client, Prop_Send, "m_iAmmo", _, offsetMol) < 1) GivePlayerItem(client, "weapon_molotov");
}
}