problem
#1

a problem at this - if

if(strcmp(CarInfo[carid][cOwner], pname, false) && IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)

the errors:

D:\ZogCs\filterscripts\Cars.pwn(680) : error 017: undefined symbol "CarInfo"
D:\ZogCs\filterscripts\Cars.pwn(680) : warning 215: expression has no effect
D:\ZogCs\filterscripts\Cars.pwn(680) : error 001: expected token: ";", but found "]"
D:\ZogCs\filterscripts\Cars.pwn(680) : error 029: invalid expression, assumed zero
D:\ZogCs\filterscripts\Cars.pwn(680) : fatal error 107: too many error messages on one line

the cmd pls help:

if (strcmp("/park", cmd, true, 10) == 0)
{
new Float,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
new pname[MAX_PLAYER_NAME];
new cOwner;
new cOwned;
GetPlayerName(playerid,pname,sizeof(pname));
carid = GetPlayerVehicleID(playerid);
GetVehiclePos(carid, x, y, z);
GetVehicleZAngle(carid, a);
if(strcmp(CarInfo[carid][cOwner], pname, false) && IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)
{
if(PlayerInfo[playerid][pPcarkey] == 9999 && PlayerInfo[playerid][pPcarkey2] == 9999)
{
SendClientMessage(playerid, COLOR_GREY, "You don't own a vehicle.");
return 1;
}
if(getcarid == carid)
{
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
new area[35];
GetPlayer2DZone(playerid, area, sizeof(area));
format(string, sizeof(string), "~w~Parked ~n~~b~(%s).",area);
GameTextForPlayer(playerid, string, 10000, 3);
format(string, sizeof(string), "Vehicle Parked: %f.01, %f.01, %f.01 Location: %s",x,y,z,area);
SendClientMessage(playerid, COLOR_YELLOW2, string);
OnPropUpdate(1,carid);
OnPlayerUpdateEx(playerid);
DestroyVehicle(carid);
ownedcar[carid] = CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
if(CarInfo[carid][cPaintjob] != 999)
{
ChangeVehiclePaintjob(carid, CarInfo[carid][cPaintjob]);
}
SetVehicleVirtualWorld(carid, CarInfo[carid][cVirWorld]);
SetVehicleModifications(carid);
TogglePlayerControllable(playerid, 1);
PutPlayerInVehicle(playerid, carid, 0);
return 1;
}
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)