Help whit jail command
#1

Hi there, i need help whit this command:

PHP код:
new bool:Jailed[MAX_PLAYERS]; 
PHP код:
dcmd_jail(playeridparams[])
{
  new 
jailedidtimestring[128];
  if(
sscanf(params"ud"jailedidtime))
  {
    
SendClientMessage(playerid, -1"/jail <id> <minutes>");
  }
  else if(
jailedid == INVALID_PLAYER_ID)
  {
    
SendClientMessage(playeridCOLOR_RED"ERROR: Player is not online.");
  }
  else if(
Jailed[jailedid] == true)
  {
    
SendClientMessage(playeridCOLOR_RED"ERROR: Player already jailed.");
  }
  else
  {
    
SetTimerEx("Unjailtime"1000 timefalse"d"jailedid);
    
format(stringsizeof(string), "%d is jailed"jailedid);
    
SendClientMessage(playeridCOLOR_REDstring);
    
SendClientMessage(jailedidCOLOR_RED"You have been jailed!");
  }
  return 
1;

PHP код:
public Unjailtime(playerid)
{
  
Jailed false;
  
SendClientMessage(jailedidCOLOR_GREEN"You're free!");
  
SetPlayerPos(jailedid1676.92541448.665310.7831);
  return 
1;

And I get these errors:

Код:
(10143) : warning 235: public function lacks forward declaration (symbol "Unjailtime")
(10145) : error 033: array must be indexed (variable "Jailed")
(10146) : error 017: undefined symbol "jailedid"
(10147) : error 017: undefined symbol "jailedid"
I found this code on the forum and I wanted to adapt it to my GameMode help please, regards!!
Reply


Messages In This Thread
Help whit jail command - by Guss - 14.03.2015, 05:05
Re: Help whit jail command - by JeaSon - 14.03.2015, 05:16
Re: Help whit jail command - by ATGOggy - 14.03.2015, 06:57

Forum Jump:


Users browsing this thread: 2 Guest(s)