I need help with the Jail cmd
#1

It works fine but when i change the coords, it places me back into the coords for the first cmd. BTW who ever made it, thanks alot.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp("/jail",cmdtext, true, 5))
{
  if(!strlen(cmdtext[6]))
  {
    SendClientMessage(playerid, 0xFF0000FF, "Usage: /jail [playerid]");
    return 1;
  }
  new ID = strval(cmdtext[6]);
  new strv[170];
  if(IsPlayerConnected(ID))
  {

    format(strv, 170, "~ You have been jailed");
    SendClientMessage(ID,0xFF8000FF, strv);
    SetPlayerPos(ID, 2756.1255,676.9288,10.8984);
  }
  return 1;
    }
 //----------second jail cmd----------
   	if(!strcmp("/jail1",cmdtext, true, 6))
{
  if(!strlen(cmdtext[6]))
  {
    SendClientMessage(playerid, 0xFF0000FF, "Usage: /jail [playerid]");
    return 1;
  }
  new ID = strval(cmdtext[6]);
  new strv[170];
  if(IsPlayerConnected(ID))
  {

    format(strv, 170, "~ You have been jailed");
    SendClientMessage(ID,0xFF8000FF, strv);
    SetPlayerPos(ID, 2755.4023,683.8808,10.8984);
  }
  return 1;
    }
	return 0;
}
Reply


Messages In This Thread
[Help]I need help with the Jail cmd - by zack3021 - 04.09.2010, 07:25
Re: I need help with the Jail cmd - by DarkPower - 04.09.2010, 08:54
Re: I need help with the Jail cmd - by zack3021 - 04.09.2010, 13:33
Re: I need help with the Jail cmd - by zack3021 - 04.09.2010, 14:27
Re: I need help with the Jail cmd - by Toni - 04.09.2010, 14:34
Re: I need help with the Jail cmd - by zack3021 - 04.09.2010, 15:00
Re: I need help with the Jail cmd - by mrcoolballs - 04.09.2010, 15:11
Re: I need help with the Jail cmd - by zack3021 - 04.09.2010, 17:09

Forum Jump:


Users browsing this thread: 3 Guest(s)