new Text3D:vehicle3Dtext[MAX_VEHICLES];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) // A jatekos beul a jarmube sofor kent
{
new vehicleid = GetPlayerVehicleID(playerid);
vehicle3Dtext[vehicleid] = Create3DTextLabel( \"Kocsi neve\", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Attach3DTextLabelToVehicle( vehicle3Dtext[vehicleid] , vehicleid, 0.0, 0.0, 2.0);
} else if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT) //A jatekos kiszall a jarmubol
{
Delete3DTextLabel( vehicle3Dtext[vehicleid] );
}
return 1;
}