SA-MP Forums Archive
How i'm suppose to manipulate the ID of the preview model? - 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)
+--- Thread: How i'm suppose to manipulate the ID of the preview model? (/showthread.php?tid=597215)



How i'm suppose to manipulate the ID of the preview model? - Ritzy2K - 28.12.2015

Okay, I want that when a player enters a vehicle, theres a preview model beside his HUD, but how do i change the id of the preview model?

I tried this Under OnPlayerEnterVehicle
Код:
new id = Car_GetID(vehicleid);
	TextDrawSetPreviewModel(playerid, car[playerid], id);
	TextDrawShowForPlayer(playerid, car[playerid]);
There's no issue with Car_GetID anyway, used it at other places, works fine.

These are the warnings.

Код:
warning 213: tag mismatch
warning 213: tag mismatch
 warning 202: number of arguments does not match definition



Re: How i'm suppose to manipulate the ID of the preview model? - jlalt - 28.12.2015

try to
PHP код:
    new id GetVehicleModel(vehicleid);
    
TextDrawSetPreviewModel(car[playerid], id);
    
TextDrawShowForPlayer(playeridcar[playerid]); 
Quote:

TextDrawSetPreviewModel(played,car[playerid], id);

TextDrawSetPreviewModel((Text:text, modelindex);


Re: How i'm suppose to manipulate the ID of the preview model? - Ritzy2K - 28.12.2015

Thankyou


Re: How i'm suppose to manipulate the ID of the preview model? - Ritzy2K - 28.12.2015

welp, this doesnt update the model, it simply shows the model "503" which i assigned while creating the textdraw. Help XD


Re: How i'm suppose to manipulate the ID of the preview model? - jlalt - 28.12.2015

Print the car model id by:
Код:
printf("%d",id);
then see if printing car id right


Re: How i'm suppose to manipulate the ID of the preview model? - Ritzy2K - 28.12.2015

Yes it prints, right. I kinda scraped the whole code and re wrote it.

Код:
new model = GetVehicleModel(vehicleid);
	
	TextDrawSetPreviewModel(PlayerData[playerid][pTextdraws][9], model);
This doesnt update the model when i enter vehicle, and this also shows a warning, tag mismatch


Re: How i'm suppose to manipulate the ID of the preview model? - Ritzy2K - 28.12.2015

Solved