Help me build this?
#2

Kick (edit the things that u want changed)
Код:
if(strcmp(cmd, "/kick", true) == 0 && PlayerAdminLevel[playerid] == 1337) // Admin Kick
	{
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /kick (id)");
  return 1;
  }
  giveplayerid = strval(tmp);
  
  if(!IsNumeric(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /kick (id) ID Must be a number");
  return 1;
  }
  new output[255];
  strmid(output,cmdtext,10,strlen(cmdtext));
  if (IsPlayerConnected(giveplayerid)) {
  SetPlayerInterior(giveplayerid,10);
  SetPlayerPos(giveplayerid,219.6257,111.2549,999.0156);
  SetPlayerFacingAngle(giveplayerid,2.2339);
  SetCameraBehindPlayer(giveplayerid);
  GetPlayerName(giveplayerid, string, 24);
  format(string, 100, "**(ADMIN KICK)** %s(%d) %s", string,giveplayerid,output);
  SendClientMessageToAll(0xFF7F50AA, string);
  printf("%s", string);
  //format(string, 100, "\2;**(ADMIN KICK)** %s(%d) %s\2;", string,giveplayerid,output);
  //ircSay(EchoConnection, EchoChan,string);
  Kicking[giveplayerid] = 1;
  SetTimer("KickPlayer",700,0);
  }
Banning (btw u can edit site blabla this is just a script part of my gamemode on my server lolz)
Код:
 if(strcmp(cmd, "/ban", true) == 0 && PlayerAdminLevel[playerid] == 1337) // Admin Ban
	{
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ban (id)");
  return 1;
  }
  giveplayerid = strval(tmp);
  
  if(!IsNumeric(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ban (id) ID Must be a number");
  return 1;
  }
  new output[255];
  strmid(output,cmdtext,9,strlen(cmdtext));
  if (IsPlayerConnected(giveplayerid)) {
  SetPlayerInterior(giveplayerid,0);
  SetPlayerPos(giveplayerid,-127.0526,2258.4316,29.4287);
  SetPlayerFacingAngle(giveplayerid,217.0701);
  SetCameraBehindPlayer(giveplayerid);
	SetTimer("BanExplosionone",500,0);
	AdminKilled[giveplayerid] =1;
  GetPlayerName(giveplayerid, string, 24);
  format(string, 100, "**(ADMIN BAN)** %s(%d) %s", string,giveplayerid,output);
  SendClientMessageToAll(0xFF7F50AA, string);
  printf("%s", string);
  if(udb_Exists(PlayerName(giveplayerid)) && PLAYERLIST_authed[giveplayerid]) {
	dUserSetINT(PlayerName(giveplayerid)).("nameban",1);
	}
  SendClientMessage(giveplayerid,COLOR_RED,"||| YOU HAVE BEEN BANNED FROM THIS SERVER");
  SendClientMessage(giveplayerid,COLOR_RED,"||| You can appeal this action at our website");
  SendClientMessage(giveplayerid,COLOR_RED,"||| Visit www.ls-rp.biz for details");
  SendClientMessage(giveplayerid,COLOR_RED,"||| Please note that we do not unban hackers/cheaters");
  Banning[giveplayerid] = 1;

  }
If u need anything else just post and if u cant get this to work ill help u with ure problem...
Reply


Messages In This Thread
Help me build this? - by -Rebel Son- - 06.05.2010, 00:47
Re: Help me build this? - by 1337 - 06.05.2010, 01:28
Re: Help me build this? - by -Rebel Son- - 06.05.2010, 01:37
Re: Help me build this? - by -Rebel Son- - 06.05.2010, 17:50
Re: Help me build this? - by Killa_ - 06.05.2010, 17:57
Re: Help me build this? - by -Rebel Son- - 06.05.2010, 19:51
Re: Help me build this? - by Killa_ - 06.05.2010, 22:54

Forum Jump:


Users browsing this thread: 1 Guest(s)