How i'm suppose to manipulate the ID of the preview model?
#1

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
Reply
#2

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

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

TextDrawSetPreviewModel((Text:text, modelindex);
Reply
#3

Thankyou
Reply
#4

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

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

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
Reply
#7

Solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)