dcmd_kick(playerid, const params[])
{
if(IsPlayerAdmin(playerid))
{
new giveplayerid;
if(!strlen(params))
{
SendClientMessage(playerid, 0xFF0000FF, "Invalid Params ! > '/kick ID'");
return 1;
}
giveplayerid = strval(params);
if(IsPlayerConnected(giveplayerid))
{
new string[39];
format(string, sizeof(string), "You have kicked ID %i", playerid);
SendClientMessage(playerid, 0xFF0000FF, string);
format(string, sizeof(string), "An admin has kicked ID %i from the server", playerid);
SendClientMessageToAll(0xFF0000FF, string);
SendClientMessage(playerid, 0xFF0000FF, "You have been kicked from the server!");
kick(giveplayerid);
{
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "[server] Error: Player is not active!");
return 1;
}
{
else
{
SendClientMessage(playerid, 0xFF0000FF, "You are not an admin with the required level!");
return 1;
}
}
}
}
dcmd_ban(playerid, const params[])
{
if(IsPlayerAdmin(playerid))
{
new giveplayerid;
if(!strlen(params))
{
SendClientMessage(playerid, 0xFF0000FF, "Invalid Params ! > ' /ban ID '");
return 1;
}
giveplayerid = strval(params);
if(IsPlayerConnected(giveplayerid))
{
new string[36];
format(string, sizeof(string), "You have banned ID %i", playerid);
SendClientMessage(playerid, 0xFF0000FF, string);
format(string, sizeof(string), "ID %i has been banned from the server!", playerid);
SendClientMessage(playerid, 0xFF0000FF, string);
SendClientMessage(playerid, 0xFF0000FF, "You have been banned from the server!");
Ban(giveplayerid);
return 1;
{
else
{
SendClientMessage(playerid, 0xFF0000FF, "[server] Error: Player is not active!");
return 1;
}
{
else
{
SendClientMessage(playerid, 0xFF0000FF, "You are not an admin with the required level!");
return 1;
}
}
}
C:\Documents and Settings\Administrator\Desktop\SAMPSERVER\gamemodes\RolePlayingServerV1.pwn(112) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrator\Desktop\SAMPSERVER\gamemodes\RolePlayingServerV1.pwn(117) : warning 225: unreachable code C:\Documents and Settings\Administrator\Desktop\SAMPSERVER\gamemodes\RolePlayingServerV1.pwn(117) : warning 217: loose indentation C:\Documents and Settings\Administrator\Desktop\SAMPSERVER\gamemodes\RolePlayingServerV1.pwn(118) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrator\Desktop\SAMPSERVER\gamemodes\RolePlayingServerV1.pwn(127) : warning 217: loose indentation C:\Documents and Settings\Administrator\Desktop\SAMPSERVER\gamemodes\RolePlayingServerV1.pwn(127) : error 017: undefined symbol "dcmd_ban" C:\Documents and Settings\Administrator\Desktop\SAMPSERVER\gamemodes\RolePlayingServerV1.pwn(127) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrator\Desktop\SAMPSERVER\gamemodes\RolePlayingServerV1.pwn(127) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrator\Desktop\SAMPSERVER\gamemodes\RolePlayingServerV1.pwn(127) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
(117) : warning 217: loose indentation (127) : warning 217: loose indentation
const params[]
params[]
#pragma tabsize 0
public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(ban,3,cmdtext); return 1; } return 0; }
Originally Posted by DarkShootah
im not sure but did you add?
pawn Код:
|
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(ban, 3, cmdtext);
dcmd(kick, 4, cmdtext);
return false;
}