i have a big problem.
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Query[256];
new VehiclesCount = strval(GetMySQLResult("SELECT COUNT(`ModelID`) FROM `vehicle`"));
for(new Vehicle = 0; Vehicle < VehiclesCount; Vehicle++)
{
//------------------// Vehicle Owner //--------------------//
format(Query,sizeof(Query),"SELECT `FraktionsID` FROM `vehicle` LIMIT %d,1",Vehicle);
new FraktionsID=strval(GetMySQLResult(Query));
if (FraktionsID == LeaderLevel[playerid] || FraktionsID == MemberLevel[playerid] || !FraktionsID)
{
}
else
{
SendClientMessage(playerid, COLOR_RED,"You are not in this Fraktion!");
RemovePlayerFromVehicle(playerid);
return 1;
}
//------------------// CarOwner //-------------------------//
format(Query,sizeof(Query),"SELECT `Car` FROM `vehicle` LIMIT %d,1",Vehicle);
new CarOwner=strval(GetMySQLResult(Query));
if(CarOwner >= 1)
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"This car cost $50000");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"give: /buycar to buy this car!");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"who not /exit");
TogglePlayerControllable(playerid,0);
return 1;
}
else
{
print("CarOwner ID 0");
}
}
return 1;
}