08.01.2013, 09:04
pawn Код:
CMD:sban(playerid,params[])
{
new targetid,reason[256];
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0xC20000FF,"Du besitzt nicht die benötigten Rechte für diese Aktion!");
if(sscanf(params,"us",targetid,reason))return SendClientMessage(playerid,0xFFA300FF, "BENUTZUNG: /sban <SpielerID / Teil vom Namen> <Grund>");
if(!IsPlayerConnected(targetid))return SendClientMessage(playerid,0xC20000FF,"Dieser Spieler ist nicht verbunden!");
if(INI_Open(GetPlayerSerialINI(targetid)))
{
INI_WriteInt("Banned",1);
INI_Save();
INI_Close();
}
new playername[MAX_PLAYER_NAME],targetname[MAX_PLAYER_NAME],string[256];
GetPlayerName(playerid,playername,sizeof(playername));
GetPlayerName(targetid,targetname,sizeof(targetname));
format(string,sizeof(string),"%s has banned %s - Reason: %s (Serial-Ban)",targetname,playername,reason);
SendClientMessageToAll(0xC5242DFF,string);
Kick(targetid);
return 1;
}
6899 : error 017: undefined symbol "INI_Save"
6900 : warning 202: number of arguments does not match definition
6898:
pawn Код:
INI_WriteInt("Banned",1);
pawn Код:
INI_Save();
pawn Код:
INI_Close();