09.03.2014, 08:47
Please help me I have this problem.
error 033: array must be indexed (variable "VehiclePos")
I am trying to make it so when the player buys the vehicle it will spawn it in one the of locations I have set.
Here is my code:
Under OnDIalogResponse
error 033: array must be indexed (variable "VehiclePos")
I am trying to make it so when the player buys the vehicle it will spawn it in one the of locations I have set.
Here is my code:
Код:
new Float:Dealership1Pos[2][3] =
{
{ 1671.8918,-1072.8073,25.7088 },
{ 1667.2391,-1124.2771,26.3949 }
};
Код:
GivePlayerMoney(playerid, -VehicleValue[id]);
PlayerInfo[playerid][pCash] -= VehicleValue[id];
format(str, sizeof(str), "MoneyTrace: %s bought a cellphone for $%i", GetName(playerid), VehicleValue[id]);
Log("/logs/moneytrace.txt", str);
new dealerid = strval(VehicleOwner[id]);
new rand = random(sizeof(Dealership1Pos));
VehicleCreated[freeid] = VEHICLE_PLAYER;
VehicleModel[freeid] = VehicleModel[id];
//VehiclePos[freeid] = DealershipPos[dealerid];
VehiclePos[freeid] = Dealership1Pos[rand][0], Dealership1Pos[rand][1], Dealership1Pos[rand][2];
VehicleColor[freeid] = VehicleColor[id];
VehicleInterior[freeid] = VehicleInterior[id];
VehicleWorld[freeid] = VehicleWorld[id];
VehicleValue[freeid] = VehicleValue[id];
GetPlayerName(playerid, VehicleOwner[freeid], sizeof(VehicleOwner[]));
VehicleOwner[freeid] = GetPlayerNameEx(playerid);
VehicleNumberPlate[freeid] = DEFAULT_NUMBER_PLATE;

