Moin Leute
Ich habe vor einigen Tagen angefangen mit der Sourcepawn Programmierung.
Leider bin ich jetzt schon am verzweifeln und weiß nicht weiter hoffentlich könnt ihr mir bei diesem kleinem Problem helfen:
Ich bekomme die Fehler wie folgt nur in meiner Server Console!
L 04/14/2013 - 12:09:41: [SM] Displaying call stack trace for plugin "ctfreeze.smx":
L 04/14/2013 - 12:09:41: [SM] [0] Line 47,...
L 04/14/2013 - 12:09:41: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 04/14/2013 - 12:09:41: [SM] Native "PrintToChat" reported: String formatted incorrectly - parameter 3 (total 2)
L 04/14/2013 - 12:09:41: [SM] Displaying call stack trace for plugin "ctfreeze.smx":
L 04/14/2013 - 12:09:41: [SM] [0] Line 47,..
Hier der Code:
include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <sdkhooks>
#include <clientprefs>
#pragma semicolon 1
public Plugin:myinfo =
{
name = "New Plugin",
author = "xXNightHawk09Xx",
description = "<- Description ->",
version = "0.1",
url = "<- URL ->"
}
new Handle:g_CvarMainPluginSwitch;
new Handle:g_CvarCtFreeze;
public OnPluginStart()
{
/* ----------- Convars ------------- */
g_CvarMainPluginSwitch = CreateConVar("plugin_enable","1");
g_CvarCtFreeze = CreateConVar("sm_ctfreeze_enable","1");
/* ----------- Events ------------- */
HookEvent("player_spawn", OnPlayerSpawn);
if(GetConVarInt(g_CvarMainPluginSwitch))
{
PrintToServer("----> Plugin Ctfreeze has been successfully loaded");
}
}
public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new team = GetClientTeam(client);
if(GetConVarInt(g_CvarCtFreeze))
{
if(team <= 2)
{
PrintToChat(client,"/x4 You are freezed for 30 seconds!");
}
}
}