[Ajuda]bans
#1

eu uso o seguinte comando para banir?

Код:
	if(strcmp(cmd, "/ban", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	  	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /ban [ID/ParteDoNome] [razгo]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 3)
			{
			  if(IsPlayerConnected(giveplayerid))
			  {
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
					  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[64];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_GRAD2, "USE: /ban [ID/ParteDoNome] [razгo]");
							return 1;
						}
						new year, month,day;
						getdate(year, month, day);
						format(string, sizeof(string), "AdmCmd: %s foi banido por %s, Razгo: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
						BanLog(string);
						format(string, sizeof(string), "AdmCmd: %s foi banido por %s, Razгo: %s", giveplayer, sendername, (result));
						SendClientMessageToAll(COLOR_LIGHTRED, string);
						PlayerInfo[giveplayerid][pLocked] = 1;
						Ban(giveplayerid);
						return 1;
					}
				}//not connected
			}
			else
			{
				format(string, sizeof(string), "  %d nгo й um player ativo.", giveplayerid);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}
so que nao esta banindo.
o player esta voltando em seguida com a mesma conta...
nao esta banindo, deve estar apenas kikando.
alguem pode me ajudar??
Reply


Messages In This Thread
[Ajuda]bans - by keller012 - 25.05.2010, 21:52
Re: [Ajuda]bans - by PawninG - 25.05.2010, 21:57
Re: [Ajuda]bans - by ipsBruno - 25.05.2010, 22:01
Re: [Ajuda]bans - by keller012 - 25.05.2010, 22:35
Re: [Ajuda]bans - by zSuYaNw - 26.05.2010, 00:49
Re: [Ajuda]bans - by TiagoPS - 26.05.2010, 01:04
Re: [Ajuda]bans - by zSuYaNw - 26.05.2010, 01:12
Re: [Ajuda]bans - by SlashPT - 26.05.2010, 19:45
Re: [Ajuda]bans - by keller012 - 27.05.2010, 00:56
Re: [Ajuda]bans - by juniorjg - 27.05.2010, 01:57

Forum Jump:


Users browsing this thread: 1 Guest(s)