SA-MP Forums Archive
Hey how would i do this?. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Hey how would i do this?. (/showthread.php?tid=88571)



Hey how would i do this?. - [mad]MLK - 27.07.2009

hey i want this to show a text draw i have made if the trailer isent attached to the vehicle but i get a error can anyone correct this? the error is on the "else" line thanks:
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  IsTrailerAttachedToVehicle(vehicleid);
  {
  else
  }
  TextDrawShowForPlayer(playerid, weburl);
  
  return 1;
}
Any ideas?. thanks


Re: Hey how would i do this?. - Daem - 27.07.2009

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  if(IsTrailerAttachedToVehicle(vehicleid))
  {
  TextDrawShowForPlayer(playerid, weburl)
  }
  return 1;
}



Re: Hey how would i do this?. - [mad]MLK - 27.07.2009

hey thanks but when i attach a trailer it still shows the text draw, any idea's why?
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  if(IsTrailerAttachedToVehicle(vehicleid))
  {
  TextDrawHideForPlayer(playerid, weburl);
  } else {
  TextDrawShowForPlayer(playerid, weburl);
  }

  return 1;
}



Re: Hey how would i do this?. - [mad]MLK - 27.07.2009

anyone know?


Re: Hey how would i do this?. - yezizhu - 27.07.2009

Nothing wrong with the code.
Try to check debug info.
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  printf("_%d_",IsTrailerAttachedToVehicle(vehicleid));
  if(IsTrailerAttachedToVehicle(vehicleid))
  {
  TextDrawHideForPlayer(playerid, weburl);
  } else {
  TextDrawShowForPlayer(playerid, weburl);
  }

  return 1;
}