Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: FREESTLYE_WILSON on December 25, 2010, 12:23:54 pm
-
can any one tell me i get admincmds like this
/c kick reason
/c slap reason
/c mute reason
/c tban
/c ban
/c subban
etc.....
-
??? ??? ???
-
ya wilson use GUPS :P
-
here how to add kick
}
else if (strcmp(cmd, "kick", true) == 0) {
new reason[256], plr, szMsg[256];
tmp = strtok(cmdtext, idx), reason = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
else if (!strlen(reason)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c kick [Nick/ID] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin %s kicked player:[ %s ] Reason:[ %s ]",gPlayers[playerid],gPlayers[plr],cmdtext[strlen(tmp)+6]);
SendClientMessageToAll(COLOR_GREEN,szMsg);
Kick(plr);
}
return 1;
anyone can kick in this lol i dont know how to set it for admin
-
else if (strcmp(cmd, "kick", true) == 0) {
new reason[256], plr, szMsg[256];
tmp = strtok(cmdtext, idx), reason = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
else if (!strlen(reason)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c kick [Nick/ID] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin %s kicked player:[ %s ] Reason:[ %s ]",gPlayers[playerid],gPlayers[plr],cmdtext[strlen(tmp)+6]);
SendClientMessageToAll(COLOR_GREEN,szMsg);
Kick(plr);
}
return 1;
Only Rcon Admin can kick
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) SendClientMessage(playerid,COLOR_RED,"You are not Rcon Admin");
else if (!strlen(reason)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c kick [Nick/ID] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin %s kicked player:[ %s ] Reason:[ %s ]",gPlayers[playerid],gPlayers[plr],cmdtext[strlen(tmp)+6]);
SendClientMessageToAll(COLOR_GREEN,szMsg);
Kick(plr);
}
return 1;
-
LOL if u mean /c tban is temporary ban there is no such thing just ban and after the time to unban just remove the banned name from the 'banlist' file. i dont know subnet ban and its to hard ask shadow or aXXo ill help you with slap here is code
}
else if (strcmp(cmd, "slap", true) == 0) {
new reason[256], snick[256], plr, health[256], szMsg[256];
tmp = strtok(cmdtext, idx),snick = strtok(cmdtext, idx), plr = FindPlayerIDFromString(snick), health = strtok(cmdtext, idx);
else if (!strlen(health)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c slap [Nick/ID] [health] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin %s slapped: %s's hp to :[ %d% ]",gPlayers[playerid],gPlayers[plr],strval(health,cmdtext[strlen(tmp)+6]));
SendClientMessageToAll(COLOR_GREEN,szMsg);
SetPlayerHealth(plr,strval(health));
}
return 1;
did this without compiling so if u find error plse say to me ::) 8)
-
LOL if u mean /c tban is temporary ban there is no such thing just ban and after the time to unban just remove the banned name from the 'banlist' file. i dont know subnet ban and its to hard ask shadow or aXXo ill help you with slap here is code
}
else if (strcmp(cmd, "slap", true) == 0) {
new reason[256], snick[256], plr, health[256], szMsg[256];
tmp = strtok(cmdtext, idx),snick = strtok(cmdtext, idx), plr = FindPlayerIDFromString(snick), health = strtok(cmdtext, idx);
else if (!strlen(health)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c slap [Nick/ID] [health] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin %s slapped: %s's hp to :[ %d% ]",gPlayers[playerid],gPlayers[plr],strval(health,cmdtext[strlen(tmp)+6]));
SendClientMessageToAll(COLOR_GREEN,szMsg);
SetPlayerHealth(plr,strval(health));
}
return 1;
did this without compiling so if u find error plse say to me ::) 8)
There is tempban command and it has to be custom made
aXXo and me are the only ones with those commands as I know (Pawno)
-
LOL if u mean /c tban is temporary ban there is no such thing just ban and after the time to unban just remove the banned name from the 'banlist' file. i dont know subnet ban and its to hard ask shadow or aXXo ill help you with slap here is code
}
else if (strcmp(cmd, "slap", true) == 0) {
new reason[256], snick[256], plr, health[256], szMsg[256];
tmp = strtok(cmdtext, idx),snick = strtok(cmdtext, idx), plr = FindPlayerIDFromString(snick), health = strtok(cmdtext, idx);
else if (!strlen(health)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c slap [Nick/ID] [health] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin %s slapped: %s's hp to :[ %d% ]",gPlayers[playerid],gPlayers[plr],strval(health,cmdtext[strlen(tmp)+6]));
SendClientMessageToAll(COLOR_GREEN,szMsg);
SetPlayerHealth(plr,strval(health));
}
return 1;
did this without compiling so if u find error plse say to me ::) 8)
There is tempban command and it has to be custom made
aXXo and me are the only ones with those commands as I know (Pawno)
U use setdate settime etc???
-
LOL if u mean /c tban is temporary ban there is no such thing just ban and after the time to unban just remove the banned name from the 'banlist' file. i dont know subnet ban and its to hard ask shadow or aXXo ill help you with slap here is code
}
else if (strcmp(cmd, "slap", true) == 0) {
new reason[256], snick[256], plr, health[256], szMsg[256];
tmp = strtok(cmdtext, idx),snick = strtok(cmdtext, idx), plr = FindPlayerIDFromString(snick), health = strtok(cmdtext, idx);
else if (!strlen(health)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c slap [Nick/ID] [health] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin %s slapped: %s's hp to :[ %d% ]",gPlayers[playerid],gPlayers[plr],strval(health,cmdtext[strlen(tmp)+6]));
SendClientMessageToAll(COLOR_GREEN,szMsg);
SetPlayerHealth(plr,strval(health));
}
return 1;
did this without compiling so if u find error plse say to me ::) 8)
There is tempban command and it has to be custom made
aXXo and me are the only ones with those commands as I know (Pawno)
U use setdate settime etc???
Yea and its complex
It takes up a total of 187 lines of script