08.04.2014, 19:42
Hello there, this is my command.
It gives me this warning:
Line 1845
pawn Код:
CMD:veh(playerid, params[])
{
new car,color,color2;
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
if(PlayerInfo[playerid][pInjuried] == 2) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: You cant do this when you're in heavily wounded modus.");
if(sscanf(params, "iii", car,color,color2)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /veh [model] [color1] [color2]");
if(car < 400 || car > 611) return SendClientMessage(playerid,COLOR_GRAD2, "Invalid vehicle ID specified !(411 - 611)");
if(color> 255 || color< 0) return SendClientMessage(playerid, COLOR_GRAD2, "Car color ID's: 0-255");
if(color2> 255 || color2< 0) return SendClientMessage(playerid, COLOR_GRAD2, "Car color ID's: 0-255");
if(IsPlayerInAnyVehicle(playerid)) return RemovePlayerFromVehicle(playerid);
oldcar[playerid] = currentcar;
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid,A);
new carid = CreateVehicle(car, X,Y,Z,A, color, color2, -1);
currentcar[playerid] = carid;
DestroyVehicle(oldcar[playerid]);
PutPlayerInVehicle(playerid,carid, 0);
LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
}
else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
return 1;
}
Код:
(1845) : error 006: must be assigned to an array
pawn Код:
oldcar[playerid] = currentcar;