Surely there is a shorter way of doing this dam dialog... 172,380 Lines...
#6

Basicly players choose a Vehicle.

Once selected there should be an array ex. new Vehicle[MAX_PLAYERS] and set Vehicle[playerid] = ModelIDOfTheVehicleTheyChose.

Then on the second dialog, they choose the color for the car, but there's two colors they have to choose, so we create another array ex. new VehicleColor[MAX_PLAYERS][2].

Once they've selected the primary color through dialog we should set VehicleColor[playerid][0] = ThePrimaryColor.

And then lastly there's a dialog for the secondary color, loop to the primary color dialog just as before, just instead of setting VehicleColor[playerid][0] (because it's already set) we set VehicleColor[playerid][1] = TheSecondaryColor.

and at the end we create our vehicle for the player and put the player in it like this,

Код:
new Float: X,
Float: Y, Float: Z, Float: A;
GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, A); new VehicleID = CreateVehicle(Vehicle[playerid], X, Y, Z, A, VehicleColor[playerid][0], VehicleColor[playerid][1], -1); PutPlayerInVehicle(playerid, VehicleID, 0);
Note. Put the arrays above the main() {} callback.
Note. You can use the same color dialog for all vehicles. Making it 85 + 126 = 211
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)