Need help with a command.
#1

So I made this command Ajail, but when I type a time It only jails the player and he is stuck there forever I tired to use variables but still doesn't work.
Here is the whole code:
pawn Код:
CMD:ajail(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");

else
{
new PlayerInfo[MAX_PLAYERS][pInfo];
new Jailed[MAX_PLAYERS];
  new otherId;
  new sendername[MAX_PLAYER_NAME];

  new string[256];
new pID, GivenName[MAX_PLAYER_NAME];


  if(sscanf(params, "u", otherId,Jailed)) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /ajail [PlayerID/PartOfName] [Time(minutes)] [Reason]");
 GetPlayerName(pID, GivenName, sizeof(GivenName));
  format(string, sizeof(string), "* You Jailed %s.", GivenName);
  SendClientMessage(playerid, COLOR_LIGHTRED, string);
 if(otherId == INVALID_PLAYER_ID) return SendClientMessage(otherId, 0xAFAFAFAA, "Invalid Player ID");
   {
Jailed[otherId] = 1;
PlayerInfo[otherId][pJailTime] = 1;
new Float:x, Float:y, Float:z;
GetPlayerPos(otherId, x, y, z);
SetPlayerPos(otherId,1769.37341309,178.79183960,1369.28161621);



GetPlayerName(playerid, sendername, sizeof(sendername)); // This is for admin name
format(string, sizeof(string), "* You have been Admin jailed by Admin %s ", sendername );
                SendClientMessage(playerid, 0xFF4646FF, string);

}

        }
    return 1;
}
this is at the top.
pawn Код:
enum pInfo
{

    pJailTime};
Reply


Messages In This Thread
Need help with a command. - by Scriptissue - 04.10.2010, 12:30
Re: Need help with a command. - by CaptainOwen - 04.10.2010, 12:37
Re: Need help with a command. - by Scriptissue - 04.10.2010, 12:39
Re: Need help with a command. - by CaptainOwen - 04.10.2010, 12:42
Re: Need help with a command. - by Scriptissue - 04.10.2010, 12:59
Re: Need help with a command. - by CaptainOwen - 04.10.2010, 14:26
Re: Need help with a command. - by samgreen - 04.10.2010, 15:30
Re: Need help with a command. - by Scriptissue - 04.10.2010, 15:55
Re: Need help with a command. - by CaptainOwen - 04.10.2010, 16:47
Re: Need help with a command. - by samgreen - 04.10.2010, 16:52

Forum Jump:


Users browsing this thread: 1 Guest(s)