SetNumberPlate Help! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetNumberPlate Help! (
/showthread.php?tid=233357)
SetNumberPlate Help! -
denisasxxl - 01.03.2011
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
Re: SetNumberPlate Help! -
Lorrden - 01.03.2011
pawn Код:
SetVehicleNumberPlate(vehicleid, string);
Re: SetNumberPlate Help! -
JaTochNietDan - 01.03.2011
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
Re: SetNumberPlate Help! -
denisasxxl - 01.03.2011
Thank's you.