05.09.2010, 03:08
Okay, So something is fucked.
It just kicks the player who sent the command. Or playerid 0.
It just kicks the player who sent the command. Or playerid 0.
Код:
if (strcmp(cmdtext,"/kick", true, 5) == 0) { if(PlayerInfo[playerid][pAdminLevel] == 0) return SendClientMessage(playerid,COLOR_RED,"Your Not an Admin and cant use this"); if(PlayerInfo[playerid][pAdminLevel] != 0) { new tmp[256], tmp2[256]; new giveplayerid; new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128]; player1 = strval(tmp); GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname)); if(!strlen(tmp2)) { format(string,sizeof(string),"%s has been kicked by Administrator %s [no reason given] ",playername,adminname); SendClientMessageToAll(COLOR_YELLOW,string); Kick(giveplayerid); return 1; } } }