05.03.2012, 23:30
You could write the current string to a PVar or an array.
Quick 'n Dirty code:
And if you create the vehicle using CreateVehicle you could set the plate text to the text of the PVar.
Quick 'n Dirty code:
WARNING: Untested code! I just want to show you the way I would do it.
Quick 'n Dirty code:
Код:
CMD:plate(playerid, params[]) { if (strlen(params)) { SetPVarString(playerid, "PlateText", params); } else { SendClientMessage(playerid, 0xA00000AA, "Usage: /plate <Your Text>"); } return true; }
Quick 'n Dirty code:
Код:
new plateText[32]; new vehicleID = CreateVehicle(modelID, posX, posY, posZ, angle, color1, color2, respawnDelay); GetPVarString(playerID, "PlateText", plateText, sizeof(plateText)); SetVehicleNumberPlate(vehicleID, plateText);