Hi, so, you can use that :
with your variable add new variable for your vehicle example :
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;
}