how to get the classname of the weapon from slot which client doesn't hold ?
need to give ammo to the players at the round_start if client has weapon, or give weapon if it does not have.
PHP Code:
public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast) {
for (int client = 1; client <= MaxClients; client++) {
.......
//get the weapon classname from slot1
//if client has weapon_awp. do
if(StrEqual(weapon, "weapon_awp") {
int ammotype = GetEntProp(slot1, Prop_Data, "m_iPrimaryAmmoType");
SetEntData(client, ammotype, 100, 4, true);
}
//else if client does not have weapon_awp
GivePlayerItem(client, "weapon_awp");
}
}
}