SetNumberPlate Help!
#1

Please help.

Код:
stock UpdateVehiclePlates ( vehicleid )
{
new string[11];
	if ( SVehInfo [ vehicleid ][ vOwner ] > 0 )
	{
		if (
			strcmp ( SVehInfo [ vehicleid ][ vPlate ], "None" ) )
		{
			if ( VehicleHasEngine ( vehicleid ) )
			{
				PlateText [ vehicleid ] = Create3DTextLabel (
											SVehInfo [ vehicleid ][ vPlate ],
											COLOR_COPBLUE,
											0, 0, 0, 20.0, 0, false );
				Attach3DTextLabelToVehicle ( PlateText [ vehicleid ], vehicleid, 0.0, 2.0, 0.0 );
                format ( string, 10,"%s", SVehInfo [ vehicleid ][ vPlate ] );
			SetVehicleNumberPlate( vehicleid ); // 2838
			}
		}
	}
}
Warring:
Код:
scripts\system\vehicles.pwn(2838) : warning 202: number of arguments does not match definition
Reply
#2

pawn Код:
SetVehicleNumberPlate(vehicleid, string);
Reply
#3

Why do you even bother with the string variable and formatting it? Just insert it directly:

pawn Код:
SetVehicleNumberPlate(vehicleid, SVehInfo [ vehicleid ][ vPlate ]);
No need for the array and no need for the format function
Reply
#4

Thank's you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)