Raised This Month: $32 Target: $400
 8% 

a little help please


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mrmiki
Junior Member
Join Date: Mar 2021
Old 08-18-2021 , 14:56   a little help please
Reply With Quote #1

hi
im trying get players awp weapon
i dont know what is wrong!
it is no working



HTML Code:
#include <sourcemod>
#include <sdktools>

new countawp=0;
new String:weaponlist2[1024] = "weapon_awp";

public OnPluginStart()
{
    HookEvent("player_spawn", Event_PlayerSpawn);
    countawp=0;
}
public OnMapStart()
{
    countawp=0;
}

public Action Event_PlayerSpawn(Handle event, const char[] name, bool dontBroadcast) 
{
    int client = GetClientOfUserId(GetEventInt(event, "userid"));
    CreateTimer(0.5, Timer1, GetClientUserId(client), TIMER_REPEAT);
    countawp=0;
}

public Action Timer1(Handle timer, any userid)
{
    
    
    if(GameRules_GetProp("m_bWarmupPeriod") == 0)
    {
        for (new i = 0; i < MaxClients; i++)
        {
            new iWeapon = GetPlayerWeaponSlot(i, 0);
            char WeaponName2[32];
            GetEdictClassname(iWeapon, WeaponName2, sizeof(WeaponName2));
            if(!StrContains(weaponlist2, WeaponName2, false))
                {
                countawp++;
                }
            PrintToChatAll(" \x02AWP = %i", countawp);
        }
    }
    return Plugin_Continue;
}
mrmiki is offline
 


Thread Tools
Display Modes

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 14:05.


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