I have started VC-MP Server With the help of Strike thanks to him i need to know how to kick and banned players.
i have Simple VC-MP Scripts rcon password i know where to enter rcon password,What si the commands to kick and banned
http://forum.vicecitymultiplayer.com/index.php?topic=1586.msg11290#msg11290
Login as admin
/admin passwordhere
/kick and /ban
RCON COMMANDS:
/kick [playerid]
/ban [playerid]
/sethr [hour]
/setmin [minute]
/sethp [playerid] [health]
/setarm [playerid] [armour]
/setmon [playerid] [money]
/setwep [playerid] [weapon]
/setcon [playerid] [1/0] <= Set Player Controlable
thanks
hey problem !
What is the pass of admin and what is rcon and What is that Commadns Strike how to do
http://famp.ru/wiki/Server
rcon - remote console
You need setup a rcon password in your server.cfg
Type /admin yourrconpass to login ingame as admin
Use edit button and don't double post.
Quote from: asad3man on April 24, 2011, 08:30:30 AM
hey problem !
What is the pass of admin and what is rcon and What is that Commadns Strike how to do
RCON is for server administration. The password is in server.cfg where it says "rcon_password"
When you get the password, type /admin
password and then /kick
playeridEDIT: Strike beat me to it
Thanx but how to kick withreason
Quote from: asad3man on April 24, 2011, 08:46:32 AM
Thanx but how to kick withreason
You need to get or write a script that can do that.
WHere is that script tell me
Quote from: asad3man on April 24, 2011, 08:48:41 AM
WHere is that script tell me
GUPS is a good starter script you can use to kick with reasons.
http://forum.vicecitymultiplayer.com/index.php?topic=1666.0
is this admin login like VC-MP
Quote from: asad3man on April 24, 2011, 08:51:06 AM
is this admin login like VC-MP
No, use /c kick instead of /kick
/c kick [player] [reason]
how to unbnnned any player which is banned
/c kick [Nick/Id] [Reason](Credits to me)
}
else if (strcmp(cmd, "kick", true) == 0) {
new reason[256], plr, szMsg[256];
tmp = strtok(cmdtext, idx), reason = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if(IsPlayerAdmin(playerid))
else if (!strlen(reason)) SendClientMessage(playerid,0xFFFF00AA,"USAGE: /c kick [Nick/ID] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,0xFFFF00AA,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin: %s kicked player:[ %s ] Reason:[ %s ]",gPlayers[playerid],gPlayers[plr],cmdtext[strlen(tmp)+6]);
SendClientMessageToAll(0xFFFF00AA,szMsg);
Kick(plr);
}
If u Dont Have FindPlayerIdFromString Function Add it (Credits to bakasan
public FindPlayerIDFromString(string[])
{// for determining player id from a string -bakasan
new player = INACTIVE_PLAYER_ID;
new p = 0;
while (p < MAX_PLAYERS) { if (strfind(gPlayers[p],string,true) != -1) { player=p;break; } p++; }
if (player == INACTIVE_PLAYER_ID) {// string didnt match so check if it can be an id
if ((strlen(string) > 2) || (isnumeric(string) == 0)) { return INACTIVE_PLAYER_ID; }
player = strval(string);// string is numeric and not more than 2 digits
}
if (!IsPlayerConnected(player)) { return INACTIVE_PLAYER_ID; }
return player;// valid id found
}
return 1;
}
Unban/Ban Command(Credits to madara)
UnBan/Ban By madara (ftp://http://forum.vicecitymultiplayer.com/index.php?topic=2528.0)
where to write it
when i put it and compile it it says Error
this error is coming
[IMG=http://img217.imageshack.us/img217/6961/75063247.png][/IMG] (http://img217.imageshack.us/i/75063247.png/)
Uploaded with ImageShack.us (http://imageshack.us)
Delete where it says:
return 1;
}
tahnx Stormous thanx
Quote from: yazeen on April 24, 2011, 01:38:45 PM
/c kick [Nick/Id] [Reason](Credits to me)
}
else if (strcmp(cmd, "kick", true) == 0) {
new reason[256], plr, szMsg[256];
tmp = strtok(cmdtext, idx), reason = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if(IsPlayerAdmin(playerid))
else if (!strlen(reason)) SendClientMessage(playerid,0xFFFF00AA,"USAGE: /c kick [Nick/ID] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,0xFFFF00AA,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin: %s kicked player:[ %s ] Reason:[ %s ]",gPlayers[playerid],gPlayers[plr],cmdtext[strlen(tmp)+6]);
SendClientMessageToAll(0xFFFF00AA,szMsg);
Kick(plr);
}
If u Dont Have FindPlayerIdFromString Function Add it (Credits to bakasan
public FindPlayerIDFromString(string[])
{// for determining player id from a string -bakasan
new player = INACTIVE_PLAYER_ID;
new p = 0;
while (p < MAX_PLAYERS) { if (strfind(gPlayers[p],string,true) != -1) { player=p;break; } p++; }
if (player == INACTIVE_PLAYER_ID) {// string didnt match so check if it can be an id
if ((strlen(string) > 2) || (isnumeric(string) == 0)) { return INACTIVE_PLAYER_ID; }
player = strval(string);// string is numeric and not more than 2 digits
}
if (!IsPlayerConnected(player)) { return INACTIVE_PLAYER_ID; }
return player;// valid id found
}
return 1;
}
Unban/Ban Command(Credits to madara)
UnBan/Ban By madara (ftp://http://forum.vicecitymultiplayer.com/index.php?topic=2528.0)
How to use these 1st one
When i am using 2nd one then reason isnot coming Why tell me i want to use 1st one When i put it it gives a huge list of error
[IMG=http://img233.imageshack.us/img233/9922/25305695.png][/IMG] (http://img233.imageshack.us/i/25305695.png/)
Uploaded with ImageShack.us (http://imageshack.us)
Quote from: asad3man on April 25, 2011, 10:44:57 AM
[IMG=http://img233.imageshack.us/img233/9922/25305695.png][/IMG] (http://img233.imageshack.us/i/25305695.png/)
Uploaded with ImageShack.us (http://imageshack.us)
First thing: what happened to
FindPlayerIDFromString()? It looks like you completely erased it. Replace this code:
public FindPlayerIDFromString(string)
{}With this code:
public FindPlayerIDFromString(string[])
{// for determining player id from a string -bakasan
new player = INACTIVE_PLAYER_ID;
new p = 0;
while (p < MAX_PLAYERS)
{
if (strfind(gPlayers[p],string,true) != -1)
{
player = p;
break;
}
p++;
}
if (player == INACTIVE_PLAYER_ID) {// string didnt match so check if it can be an id
if ((strlen(string) > 2) || (isnumeric(string) == 0)) { return INACTIVE_PLAYER_ID; }
player = strval(string);// string is numeric and not more than 2 digits
}
if (!IsPlayerConnected(player)) { return INACTIVE_PLAYER_ID; }
return player;// valid id found
}
Another problem is that your code isn't in the right place. Everything between
if (strcmp and
Kick(plr); } should be somewhere in
OnPlayerCommandText.
hey i need to kick players with reason is it without Reasonable....
Quote from: asad3man on April 25, 2011, 12:19:04 PM
hey i need to kick players with reason is it without Reasonable....
If you get rid of this line:
else if (!strlen(reason)) SendClientMessage(playerid,0xFFFF00AA,"USAGE: /c kick [Nick/ID] [Reason]");You won't need a reason to kick.
i want to kick with reason what i have to add
Quote from: asad3man on April 25, 2011, 12:55:01 PM
i want to kick with reason what i have to add
You don't have to add anything to kick with reasons.
when i kick like this /kick 1 lolz then it just kick dont give reason and give me fulll COmmands of VC-MP server
Quote from: asad3man on April 25, 2011, 01:40:36 PM
when i kick like this /kick 1 lolz then it just kick dont give reason and give me fulll COmmands of VC-MP server
You need to script if you want reason and other stuffs to be displayed, you have a choice of using Pawno / mIRC (which is obsolete atm).
/kick command is a RCON cmd, so it just kicks the player based on the given plr id, you can't display reason or any other statements over there.
Troll noob
Use Common Sense .. In Script .pwn
Quote from: BIG[H] on April 25, 2011, 02:37:20 PM
Troll noob
Use Common Sense .. In Script .pwn
BIG, try to actually help newbies to scripting. Don't call them trolling noobs or they won't learn.