Unfreezing stuff and changing model preview id on playertextdraw
#4

I dont see you changing the previewmodel in that code.
So try this:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(newstate == PLAYER_STATE_DRIVER)
	{
		new id = GetVehicleID(GetPlayerVehicleID(playerid));
		if(IsVeh(id))
		{
			if(VehInfo[id][vCreated] == 1)
			{
			    TogglePlayerControllable(playerid, 0);
				PlayerTextDrawShow(playerid, TDCoS0[playerid]);
				PlayerTextDrawShow(playerid, TDCoS1[playerid]);
				PlayerTextDrawShow(playerid, TDCoS2[playerid]);
				PlayerTextDrawShow(playerid, TDCoS3[playerid]);
				PlayerTextDrawShow(playerid, TDCoS4[playerid]);
				PlayerTextDrawShow(playerid, TDCoS5[playerid]);
				PlayerTextDrawSetPreviewModel(playerid, TDCoS6[playerid], GetVehicleModel(GetPlayerVehicleID(playerid))); 
				PlayerTextDrawShow(playerid, TDCoS6[playerid]);
				PlayerTextDrawShow(playerid, TDCoS7[playerid]);
				PlayerTextDrawShow(playerid, TDCoS8[playerid]);
				new imevozila[10];
				if(VehInfo[id][vVrsta] == 1) { imevozila = "Automobil"; }
				if(VehInfo[id][vVrsta] == 2) { imevozila = "Motor"; }
				if(VehInfo[id][vVrsta] == 3) { imevozila = "Letelicu"; }
				if(VehInfo[id][vVrsta] == 4) { imevozila = "Brod"; }
				new cenaa[50], imea[50], markaa[50], ida[50], vlasnika[50];
    			format(cenaa, sizeof(cenaa), "CENA: ~w~%d $", VehInfo[id][vCena]);
    			format(markaa, sizeof(markaa), "MARKA: ~w~%s", VehicleNames[VehInfo[id][vModel]-400]);
    			format(vlasnika, sizeof(vlasnika), "VLASNIK: ~w~%s", VehInfo[id][vVlasnik]);
    			format(ida, sizeof(ida), "ID: ~w~%d", VehInfo[id][vID]);
    			format(imea, sizeof(imea), "KUPI %s", imevozila);
    			PlayerTextDrawSetString(playerid, TDCoS1[playerid], imea);
    			PlayerTextDrawSetString(playerid, TDCoS2[playerid], markaa);
    			PlayerTextDrawSetString(playerid, TDCoS3[playerid], cenaa);
    			PlayerTextDrawSetString(playerid, TDCoS4[playerid], ida);
    			PlayerTextDrawSetString(playerid, TDCoS5[playerid], vlasnika);
			    SetTimerEx("Bleja", 100, false, "i", playerid);
				SelectTextDraw(playerid, 0x4665ffff);
				return 1;
			}
			if(VehInfo[id][vCreated] == 2)
			{
			    new strica[128];
			    new imeigraca[MAX_PLAYER_NAME];
			    GetPlayerName(playerid, imeigraca, sizeof(imeigraca));
			    if(!strcmp(imeigraca, VehInfo[id][vVlasnik], false))
			    {
				    format(strica,sizeof(strica),"~R~VLASNIK: ~W~%s", VehInfo[id][vVlasnik]);
					GameTextForPlayer(playerid, strica, 3000, 3);
				}
				else
				{
				    format(strica,sizeof(strica),"~R~VLASNIK: ~W~%s", VehInfo[id][vVlasnik]);
					GameTextForPlayer(playerid, strica, 3000, 3);
					SCM(playerid, -1, "{FF0000}Nemate kljuceve od ovog vozila.");
					RemovePlayerFromVehicle(playerid);
				}
			}
		}
	}
Reply


Messages In This Thread
Unfreezing stuff and changing model preview id on playertextdraw - by bugi - 03.01.2016, 16:42
Re: Unfreezing stuff and changing model preview id on playertextdraw - by justinnater - 03.01.2016, 16:55
Re: Unfreezing stuff and changing model preview id on playertextdraw - by bugi - 03.01.2016, 17:03
Re: Unfreezing stuff and changing model preview id on playertextdraw - by justinnater - 03.01.2016, 17:19
Re: Unfreezing stuff and changing model preview id on playertextdraw - by bugi - 03.01.2016, 18:10

Forum Jump:


Users browsing this thread: 1 Guest(s)