30.12.2011, 04:09
How can i convert this to zcmd
pawn Код:
if(strcmp("/ckick", cmdtext, true, 5) == 0)
{
if(IsPlayerLuxAdmin(playerid)){ // Check if you're an admin.
if(!strlen(cmdtext[6])){
return SendClientMessage(playerid, 0xFFAA00AA, "Usage: /ckick [id]");
}
new targetid = strval(cmdtext[6]);
if(IsPlayerConnected(targetid)){
new string[128], playername[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME];
new string2[128];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
GetPlayerName(targetid, targetname, MAX_PLAYER_NAME);
format(string, 128, "** SERVER KICK: %s has been kicked from the server - Cheats Detected", targetname);
format(string2, -1, "** Dear %s cheats are {FF0000}not allowed. {FF00FF}-Admins of sng.",targetname);
SendClientMessageToAll(COL_ADMIN, string);
SendClientMessage(targetid, 0xFF00FFAA, string2);
SetPlayerPos(targetid, 219.1898,109.5359,999.0156);
SetPlayerInterior(targetid, 10);
SetPlayerFacingAngle(targetid, 359.5181);
Kick(targetid);
}
else{
return SendClientMessage(playerid, 0xFFAA00AA, "That player is not connected.");
}
}
else{
return SendClientMessage(playerid, 0xFFAA00AA, "SERVER: Unknown Command.");
}
return 1;
}