SA-MP Forums Archive
Plates don't get printed in correctly. - 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)
+--- Thread: Plates don't get printed in correctly. (/showthread.php?tid=608294)



Plates don't get printed in correctly. - justjamie - 30.05.2016

Hello.
Sometimes when i use /friskcar, it prints out the plate correctly, but sometimes it does the half of the plate, and then randomly my name behind it.
This is my code:
PHP код:
COMMAND:friskcar(playerid, params[])
{
    new 
car = GetPlayerNearestVehicle(playerid);
    if(
GetDistanceFromPlayerToVehicle(playerid, car) > 5.0)
        return 
SendClientError(playerid, "There is no vehicle around you!");
    
SendClientMSG(playerid, COLOR_WHITE, "[%s]: Plate: (%s) Guns(%d) - Lead(%s/50,000) - Metal(%s/50,000}",GetVehicleName(car),cInfo[car][plate], comps[car][guns], number_format(vehicleLead[car]), number_format(vehicleMetal[car]));
    if(
CarBombActive[car]) SendClientMSG(playerid, COLOR_RED, " WARNING: Looks like this vehicle has a fused bomb!");
    for(new 
i=0;i<13;i++)
    {
        if(
VehicleWeapon[car][i]) SendClientMSG(playerid, COLOR_WHITE, " Weapon: %s (%d ammo) (Slot: %d)", aWeaponNames[VehicleWeapon[car][i]], VehicleAmmo[car][i], i);
    }
    
format(iStr, sizeof(iStr), "is frisking the %s.", GetVehicleName(car));
    
Action(playerid, iStr);
    return 
1;
}