(want awp no scope on my server)
Hi i have created a server and i have implanted "no scoutscope mod"
When i changed the weaponame it diasbled the mod,
Therefore i think it has to do with the "weapon name" because i changed it back to [32] and it worked again.
please help me i want a server noscope awp
any help deeply appriciated
Sean,
if (g_enabled && g_bulletpath)
{
new clientid = GetClientOfUserId(GetEventInt(event, "userid"));
new String:weaponname[32];
GetEventString(event, "weapon", weaponname, sizeof(weaponname));
if (StrEqual(weaponname, "scout", false))
{
DrawLaser(clientid);
}
}
}
public Action:EventWeaponZoom(Handle:event,const String:name[],bool:dontBroadcast)
{
if (g_enabled)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new String:weaponname[32];
GetClientWeapon(client, weaponname, sizeof(weaponname));
if (StrEqual(weaponname, "weapon_scout", false))
{
new weapon = GetPlayerWeaponSlot(client, 0);
if (IsValidEdict(weapon))
{
RemovePlayerItem(client, weapon);
RemoveEdict(weapon);
CreateTimer(0.1, GiveScout, client);
PrintHintText(client, "%t", "Not Allowed");