Help to remove a parameter
#1

Hi guys, I have this command for sending players to jail:

PHP код:
dcmd_jail(playeridparams[])
{
  new 
jailedidtimestring[128];
  if(
sscanf(params"ud"jailedidtime)) return SendClientMessage(playerid, -1"/jail [id] [minutes]");
  if(
jailedid == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_RED"Player is not online.");
  if(
Jailed[playerid] == true) return SendClientMessage(playeridCOLOR_RED"The player is already jailed");
  
Jailed[playerid]=true;
  
SetTimerEx("Unjailtime"60000 timefalse"d"jailedid);
  
format(stringsizeof(string), "%s has been jailed"GetPlayerNameEx(jailedid));
  
SendClientMessageToAll(COLOR_REDstring);
  
SetPlayerPos(jailedid, -27.14552321.164824.3034);
  
SetPlayerInterior(jailedid0);
  
SendClientMessage(jailedidCOLOR_RED"YOU ARE JAILED!!");
  return 
1;

I want to remove the parameter "minute" and thus only be "/jail id" for a time of 1 minute fixed.

Here is the rest of the code:


PHP код:
new bool:Jailed[MAX_PLAYERS]; 
PHP код:
forward Unjailtime(playerid);
public 
Unjailtime(playerid)
{
  new 
string[128];
  
Jailed[playerid] = false;
  
SetPlayerPos(playerid, -20.88892334.466324.1406);
  
SetPlayerInterior(playerid0);
  
format(stringsizeof(string), "%s is free"GetPlayerNameEx(playerid));
  
SendClientMessageToAll(COLOR_ORANGEstring);
  return 
1;

Thanks for all the help, regards!
Reply


Messages In This Thread
Help to remove a parameter - by Guss - 15.03.2015, 02:49
Re: Help to remove a parameter - by X337 - 15.03.2015, 02:51
Re: Help to remove a parameter - by StreetGT - 15.03.2015, 03:02

Forum Jump:


Users browsing this thread: 1 Guest(s)