Problem, with output probably?
#1

Alright I downloaded a script from this site.. but since the topic is dead I might as well create a topic here with my question.. well here goes:

Код:
if(strcmp(cmd, "/freeze", true) == 0 && PlayerAdminLevel[playerid] == 1337) // Freeze A Player
	{
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp)) {
  SendClientMessage(playerid, COLOR_WHITE, "USAGE: /freeze (id)");
  return 1;
  }
  giveplayerid = strval(tmp);

  if(!IsNumeric(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /freeze (id) ID Must be a number");
  return 1;
  }
  new output[255];
  strmid(output,cmdtext,8,strlen(cmdtext));
  if (IsPlayerConnected(giveplayerid)) {
  TogglePlayerControllable(giveplayerid, 0);
  GetPlayerName(giveplayerid, string, 24);
  format(string, 100, "**(ADMIN FREEZE)** %s(%d) %s", string,giveplayerid,output);
  SendClientMessageToAll(0xFF7F50AA, string);
  printf("%s", string);
  Frozen[giveplayerid] =1;
  }
  else {
  format(string, sizeof(string), "ID (%d) Is not an active player", giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  }
  return 1;
  }
Thats the /freeze code

So lets say I type /freeze 0 test

In-game i should see:

**(ADMIN FREEZE)** Daan(0) test

but i see this:



(small issue, but kinda annoying)

Same with /ban.. some text just disappears:



/ban code:

Код:
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.lv-rcr.com for details");
  SendClientMessage(giveplayerid,COLOR_RED,"||| Please note that we do not unban hackers/cheaters");
  Banning[giveplayerid] = 1;

  }
  else {
  format(string, sizeof(string), "ID (%d) Is not an active player", giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  }
  return 1;
  }
Probably a little bit weird explained lol.. but I'm sure you guys will understand.

Thanks in advance...


Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)