31
mIRC/pawn Scripting / Re: Static help needed! I am making scripts gups v5
« on: December 14, 2010, 08:21:54 pm »
OMG thanks..
i have a Zombie server! and other normal server
i have a Zombie server! and other normal server
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
[Syntax] - The correct use: /c unban <player> <reason>");
else if (strcmp(cmd, "ban", true) == 0) {plz help to correct it plz
new szMsg[256], reason[256], plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp), reason = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!IsPlayerCommandLevel(playerid,"ban")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
else if (!strlen(reason)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c ban [Nick/ID] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
new string[256],IP[256];
format(file, sizeof(file), BANS_FILE, gPlayers[plr]);
format(szMsg,sizeof(szMsg),"Admin %s Banned player:[ %s ] Reason:[ %s ]",gPlayers[playerid],gPlayers[plr],cmdtext[strlen(tmp)+5]);
SendClientMessageToAll(COLOR_GREEN,szMsg);
GetPlayerIp(playerid,IP,256);
format(string,256,"%s",IP);
dini_Create(file);
dini_Set(file, "Login", "0");
dini_Set(file, "Ip", string);
dini_Set(file, "BannedBy", gPlayers[playerid]);
dini_Set(file, "Reason", cmdtext[strlen(tmp)+5]);
Ban(plr);
}
return 1;
}