SA-MP Forums Archive
GetVehicleModel problem? - 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: GetVehicleModel problem? (/showthread.php?tid=101476)



GetVehicleModel problem? - clavador - 10.10.2009

Hi there.

I'm using this little code to get the vehiclemodel of every car I enter, but after a few cars, the number of the model gets stuck:

Код:
public OnPlayerEnterVehicle(playerid)
{
  new string[128];
  format(string,sizeof(string), "modelo vehiculo: %i", GetVehicleModel(playerid));
  SendClientMessage(playerid, 0x00ff0000, string);
	return 1;
}
This means that if I enter a vehicle with modelid of 401, then 565 and then 601, after a few cars it will always show 601 & I have to re-generate the cars reloading the FS to get it working again. But it happens again and again..

Is this a bug with the command or is something wrong that can be causing this?




Re: GetVehicleModel problem? - Correlli - 10.10.2009

You're not using it correctly.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  new string[128];
  format(string, sizeof(string), "modelo vehiculo: %i", GetVehicleModel(vehicleid));
  SendClientMessage(playerid, 0x00ff0000, string);
  return 1;
}
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle
https://sampwiki.blast.hk/wiki/GetVehicleModel


Re: GetVehicleModel problem? - clavador - 10.10.2009

Quote:
Originally Posted by Don Correlli
You're not using it correctly.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  new string[128];
  format(string, sizeof(string), "modelo vehiculo: %i", GetVehicleModel(vehicleid));
  SendClientMessage(playerid, 0x00ff0000, string);
  return 1;
}
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle
https://sampwiki.blast.hk/wiki/GetVehicleModel
Yeah, how dumb of me... =D

I couldn't look at the wiki because it keeps saying "internal error 500" since a few days ago.

It's up & down all the time.

Thank you very much for the orientation.


Re: GetVehicleModel problem? - Correlli - 11.10.2009

You're welcome.