help :'(
#1

i have maked kick command its work and its kick but i need help how i can make when the player kicked the name saved in my logs file

Pawn
Код:
dcmd_kick(playerid,params[])
{
	new
	    Reason[256],
	    player1,
	    pID,
		i;
    if(Player[playerid][admin] < 3){
	 	return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command!");
 		}
	if(sscanf(params,"us",pID,Reason)){
		return SendClientMessage(playerid,COLOR_RED,"USAGE: /kick [playerid] [reason]");
		}
	if(!IsPlayerConnected(pID)) {
	    return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
	    }
 	if(Player[player1][admin]){
    	return SendClientMessage(playerid,COLOR_RED,"You can't KICK yourself");
     	}
	if(Player[playerid][admin] < Player[pID][admin]){
		return SendClientMessage(playerid,COLOR_RED,"You can`t KICK a high ranked admin");
		}
	new
	        name[MAX_PLAYER_NAME],
	        string[256], string2[256], string3[256];
	GetPlayerName(pID,name,sizeof(name));
	format(string,sizeof(string),"**(ADMIN KICK)** %s(%d) %s",name,pID,Reason);
	format(string2,sizeof(string2),"%s(%d) (Has Been Forced To Read Rules)",name,pID);
	format(string3,sizeof(string3),"You Have Been KICKED By Admin For Reason: %s",Reason);
	SendClientMessageToAll(COLOR_RED,string);
	SendClientMessageToAll(COLOR_RED,string2);
	SendClientMessage(i,COLOR_RED,string3);
 	Kick(pID);
  	return 1;
}
Reply
#2

use print(string);
Reply
#3

Код:
  dcmd_kick(playerid,params[])
{
 new pname[MAX_PALYER_NAME];
new string[100];
    new
        Reason[256],
        player1,
        pID,
        i;
    if(Player[playerid][admin] < 3){
         return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command!");
         }
    if(sscanf(params,"us",pID,Reason)){
        return SendClientMessage(playerid,COLOR_RED,"USAGE: /kick [playerid] [reason]");
        }
    if(!IsPlayerConnected(pID)) {
        return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
        }
     if(Player[player1][admin]){
        return SendClientMessage(playerid,COLOR_RED,"You can't KICK yourself");
         }
    if(Player[playerid][admin] < Player[pID][admin]){
        return SendClientMessage(playerid,COLOR_RED,"You can`t KICK a high ranked admin");
        }
    new
            name[MAX_PLAYER_NAME],
            string[256], string2[256], string3[256];
    GetPlayerName(pID,name,sizeof(name));
    format(string,sizeof(string),"**(ADMIN KICK)** %s(%d) %s",name,pID,Reason);
    format(string2,sizeof(string2),"%s(%d) (Has Been Forced To Read Rules)",name,pID);
    format(string3,sizeof(string3),"You Have Been KICKED By Admin For Reason: %s",Reason);
    SendClientMessageToAll(COLOR_RED,string);
    SendClientMessageToAll(COLOR_RED,string2);
    SendClientMessage(i,COLOR_RED,string3);
	printf("/* <KICK> Player %s was kicked. */",pname);
     Kick(pID);
      return 1;
}
"printf("/* <KICK> Player %s was kicked. */",pname);"

/* and */ make it green..
Reply
#4

thanks
Reply
#5

No the /* and */ make it a comment - the /* shows the start of the comment and */ the end of comment.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)