Hello
I'd like 2 request a very simple plugin
On round start player with ADMFLAG_RESERVATION will get weapon_deagle with 1 bullet
Anyone can help
?
PS (I dont know how 2 give deagle with 1 ammo ;-; here is my current plugin code)
PS2 (How can i block pickup deagle for non ADMFLAG_RESERVATION players?)
Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <sdkhooks>
public Plugin:myinfo = {
name = "[ CSGO ] 1 Bullet Deagle",
author = "unkn0wn",
description = "lolyou",
version = "1.0.0",
url = ""
}
public OnPluginStart() {
HookEvent("player_spawn", Event_PlayerSpawn);
}
public Action Event_PlayerSpawn(Handle event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(GetEventInt(event, "userid"));
if (IsValidPlayer(client) && IsPlayerVip(client)) {
GivePlayerItem(client, "weapon_deagle");
}
}
stock bool IsValidPlayer(int client) {
if(client >= 1 && client <= MaxClients && IsClientConnected(client) && !IsFakeClient(client) && IsClientInGame(client) )
return true;
return false;
}
stock bool IsPlayerVip(int client) {
if (CheckCommandAccess(client, "check_vip", ADMFLAG_RESERVATION, false)) return true;
return false;
}