help :'( - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help :'( (
/showthread.php?tid=183115)
help :'( -
[MKD]Max - 14.10.2010
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;
}
Re: help :'( -
Leeroy. - 14.10.2010
use print(string);
Re: help :'( -
Saitecx - 14.10.2010
Код:
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..
Re: help :'( -
[MKD]Max - 14.10.2010
thanks
Re: help :'( -
Spiral - 14.10.2010
No the /* and */ make it a comment - the /* shows the start of the comment and */ the end of comment.