SetVehicleNumberPlate does not work for me
#4

He means you have to do it this way:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new
        name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    SetVehicleNumberPlate(vehicleid, name);
    SetVehicleToRespawn(vehicleid);
    return 1;
}
Please note that if the player enters the vehicle and it's moved from it's original spawning position it won't respawn where the player is. This can be avoided by doing this:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new
        name[MAX_PLAYER_NAME], vx, vy, vz;
    GetPlayerName(playerid, name, sizeof(name));
    SetVehicleNumberPlate(vehicleid, name);
    SetVehicleToRespawn(vehicleid);
    SetVehiclePos(vehicleid, vx, vy, vz);
    PutPlayerInVehicle(playerid, vehicleid, 0);
    return 1;
}
Reply


Messages In This Thread
SetVehicleNumberPlate does not work for me - by Divine - 30.01.2011, 11:59
Re: SetVehicleNumberPlate does not work for me - by [NoV]LaZ - 30.01.2011, 12:12
Re: SetVehicleNumberPlate does not work for me - by Divine - 30.01.2011, 12:38
Re: SetVehicleNumberPlate does not work for me - by Not available - 30.01.2011, 12:43
Re: SetVehicleNumberPlate does not work for me - by Divine - 30.01.2011, 12:56
Re: SetVehicleNumberPlate does not work for me - by Not available - 30.01.2011, 13:10
Re: SetVehicleNumberPlate does not work for me - by Divine - 30.01.2011, 13:37

Forum Jump:


Users browsing this thread: 1 Guest(s)