Attaching symbol to vehicle
#4

Hi, so, you can use that :
with your variable add new variable for your vehicle example :
Код:
new salim;
and
Код:
new Text3D:label[MAX_PLAYERS];
after in OnGameModeInit add that
Код:
public OnGameModeInit()
{
salim = CreateVehicle(415,1988.4868,-1674.2389,14.5279,269.3642,193,193,120);// your car identified
return 1;
}
if you wan't add a plate add that in OnGameModeInit
Код:
SetVehicleNumberPlate(salim, "{FF0000}Salim");
after in
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new Text3D:salim3D = Create3DTextLabel("Car Of Salim", 0x00FF40FF, 30.0, 40.0, 50.0, 40.0, 0);

	if(newstate == PLAYER_STATE_DRIVER)
	{
	    if(vehicleid == salim) // here name of car identified in ongamemodeinit
	    {

    		Attach3DTextLabelToVehicle(salim3D, salim, 0.0, 0.0, 0.7);
        	}
		if(strcmp(pname, "Salim", true) == 0) //here your surname in game
	        {

	        	return 1;
        	}
        	else
        	{
        	    RemovePlayerFromVehicle(playerid);
        	    SendClientMessage(playerid, COLOR_RED, "Sorry, it's the vehicle of Salim");
        	}
            }
	}
}
return 1;
}
Reply


Messages In This Thread
Attaching symbol to vehicle - by SwagMate - 18.04.2016, 10:28
Re: Attaching symbol to vehicle - by ATomas - 18.04.2016, 11:02
Re: Attaching symbol to vehicle - by Threshold - 18.04.2016, 11:55
Re: Attaching symbol to vehicle - by Saliim - 18.04.2016, 11:59

Forum Jump:


Users browsing this thread: 1 Guest(s)