/kick command help plz. -
mittukuttan - 10.01.2013
with sscanf+zcmd /kick id reason
Re: /kick command help plz. -
Threshold - 10.01.2013
pawn Код:
CMD:kick(playerid, params[])
{
if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid, 0xFF0000FF, "Only Administrators can use this command."); //Replace PlayerInfo with your own enum/variables
new id, reason[60];
if(sscanf(params, "uS(No Reason)[60]", id, reason)) return SendClientMessage(playerid, 0xFF0000FF, "SYNTAX: /kick [Player ID] [Optional: Reason]");
if(strlen(reason) > 60) return SendClientMessage(playerid, 0xFF0000FF, "Your reason must be less than 60 characters long.");
new string[150];
format(string,sizeof(string),"Administrator %s Has Kicked %s | Reason: %s", Name(playerid), Name(id), reason);
SendClientMessageToAll(0xFF0000FF, string);
Kick(id);
return 1;
}
stock Name(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}
Re: /kick command help plz. -
kaisersouse - 10.01.2013
You'll never learn if everyone does it for you
Re: /kick command help plz. -
Fabio11 - 10.01.2013
And kick is a very basic command, if you can't do a /kick, better check wiki samp and some tutorials.
Re: /kick command help plz. -
mittukuttan - 11.01.2013
C:\Users\intel\Desktop\JERIN'S MAGIC WORLD\samp\gamemodes\YOUNGS-WORLD.pwn(590) : error 017: undefined symbol "PlayerInfo"
C:\Users\intel\Desktop\JERIN'S MAGIC WORLD\samp\gamemodes\YOUNGS-WORLD.pwn(590) : warning 215: expression has no effect
C:\Users\intel\Desktop\JERIN'S MAGIC WORLD\samp\gamemodes\YOUNGS-WORLD.pwn(590) : error 001: expected token: ";", but found "]"
C:\Users\intel\Desktop\JERIN'S MAGIC WORLD\samp\gamemodes\YOUNGS-WORLD.pwn(590) : error 029: invalid expression, assumed zero
C:\Users\intel\Desktop\JERIN'S MAGIC WORLD\samp\gamemodes\YOUNGS-WORLD.pwn(590) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: /kick command help plz. -
Threshold - 11.01.2013
//Replace PlayerInfo with your own enum/variables
Re: /kick command help plz. -
mittukuttan - 11.01.2013
how
can u re command it
Re: /kick command help plz. -
mittukuttan - 11.01.2013
plz help me
Re: /kick command help plz. -
venomlivno8 - 11.01.2013
Just do this...
pawn Код:
CMD:kick(playerid, params[])
{
new pID,
aName[MAX_PLAYER_NAME], // Name of the admin that kicked player
pName[MAX_PLAYER_NAME], // Name of the kicked player
reason[64],
kickstring[256];
if(sscanf(params, "us[64]", pID, reason) return SCM(playerid, COL_WHITE, " USAGE:/kick [playerid/name] [reason]");
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COL_RED, " You are not allowed to do that!");
}
else
{
format(kickstring, sizeof(kickstring), "AdmCmd:%s has kicked %s for : %s", aName, pName, reason);
SendClientMessageToAll(COL_RED, kickstring);
Kick(pID);
}
return 1;
}
Re: /kick command help plz. -
mittukuttan - 11.01.2013
C:\Users\intel\Desktop\JERIN'S MAGIC WORLD\samp\gamemodes\YOUNGS-WORLD.pwn(596) : error 001: expected token: ")", but found "return"
C:\Users\intel\Desktop\JERIN'S MAGIC WORLD\samp\gamemodes\YOUNGS-WORLD.pwn(596) : error 017: undefined symbol "SCM"
C:\Users\intel\Desktop\JERIN'S MAGIC WORLD\samp\gamemodes\YOUNGS-WORLD.pwn(604 -- 605) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.