View Single Post
Author Message
Avaray
Member
Join Date: Dec 2011
Location: Germany
Old 01-10-2014 , 18:52   Can someone fix this plugin for me?
Reply With Quote #1

Im trying to create plugin. I dont know what to do.

Error in lines 14, 19, 24
// error 092: number of arguments does not match definition

This plugin should create annotation above admin head when round ends, and hide that annotation when new round begins or when he die.

PHP Code:
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1

public OnPluginStart()
{
    
HookEvent("round_start"Event_RoundStart);
    
HookEvent("teamplay_round_win"Event_RoundWin);
    
HookEventEx("player_death"event_player_deathEventHookMode_Post);
}

public 
Event_RoundWin(Handle:event, const String:name[], bool:dontBroadcast)
{
    
ShowADMIN();
}

public 
Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
    
HideADMIN();
}

public 
Action:event_player_death(Handle:event, const String:name[], bool:dontBroadcast)
{
    
HideADMIN();
}

ShowADMIN(client)
{
    if (!
client && !IsClientInGame(client) && !IsPlayerAlive(client) && CheckCommandAccess(client"generic_admin"ADMFLAG_GENERICtrue)) 
        {
            new 
Handle:event CreateEvent("show_annotation");
            if(
event == INVALID_HANDLE) return;
            
SetEventInt(event"follow_entindex"client);
            
SetEventInt(event"id"client);
            
SetEventFloat(event"lifetime"86400.0);
            
SetEventString(event"text""ADMIN");
            
FireEvent(event);
        }
}

HideADMIN(client)
{
    new 
Handle:event CreateEvent("hide_annotation");
    if(
event == INVALID_HANDLE) return;
    
SetEventInt(event"id"client);
    
FireEvent(event);

And is that line #9 Ok?
__________________

Last edited by Avaray; 01-10-2014 at 18:58.
Avaray is offline