Raised This Month: $51 Target: $400
 12% 

Problem with code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pokas
Junior Member
Join Date: Dec 2020
Old 12-03-2020 , 02:42   Problem with code
Reply With Quote #1

Hi, i need help with my code.

HTML Code:
plugin.sp(23) : warning 219: local variable "client" shadows a variable at a preceding level
plugin.sp(23) : error 017: undefined symbol "event"

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




public OnPluginStart()
{
	RegAdminCmd("sm_buyvip", buy, ADMFLAG_RCON);
}

public Action buy(int client, int args)
{
	int client = GetClientOfUserId(event.GetInt ("userid"));
	
	if (GetClientTeam(client) == CS_TEAM_T && GetClientTeam(client) == CS_TEAM_CT) // I know it's unnecessary x
	{
			char SteamID[32];
			GetClientAuthId(client, AuthId_Steam2, SteamID, 32, true);
			AddUserFlags(client, ADMFLAG_RESERVATION);
	}
}

I chose the wrong department, I wanted to choose sourcemod

Last edited by Pokas; 12-03-2020 at 03:46. Reason: 45 / 5000 Wyniki tłumaczenia I chose the wrong department, I wanted to choose sourcemod
Pokas is offline
Reply



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 21:22.


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