28.07.2014, 03:50
So what's wrong with the code?
Marked the error line as you can see in the code below
Marked the error line as you can see in the code below
pawn Код:
CMD:buycar(playerid, params[])
{
new carid, name[MAX_PLAYER_NAME];
if(IsPlayerInAnyVehicle(playerid))
{
carid = GetPlayerVehicleID(playerid);
if(IsASalesVeh(carid))
{
if(GetPlayerMoney(playerid) >= cInfo[carid][Price]); // Error line
{
GetPlayerName(playerid, name, sizeof(name));
cInfo[carid][Owned] = 1;
strmid(cInfo[carid][Owner], name, 0, strlen(name), 999);
GiveCash(playerid, -cInfo[carid][Price]);
}
else return SCM(playerid, -1, "You can't afford this vehicle");
}
else return SCM(playerid, -1, "This isn't a Dealership vehicle");
}
else return SCM(playerid, -1, "You're not in a vehicle");
return true;
}