Cand ma inregistrez pe el si dau /v imi apar acolo 2 masini o data am avut infernus si perenial,am sters contul si am facut altul mi-a dat un comet si zr-350
cum pot sa repar aceasta problema
la comanda /v apare asta
if(BlockVehUse[playerid] != 0) return SS(playerid, COLOR_RED2, "Ai prea multe masini, foloseste /sellcar si vinde una.", "You have to many vehicles, use /sellcar and sell one.");
si mai apare chestia asta cand ma inregistrez
if(count > PlayerInfo[playerid][pCarSlots])
{
if(PlayerInfo[playerid][pLanguage] == 2) format(string, sizeof(string), "Ai prea multe masini! Poti avea maxim %d masini (tu ai %d).", PlayerInfo[playerid][pCarSlots], count);
else format(string, sizeof(string), "You have to many vehicles! You can have maximum %d cars (you have %d).", PlayerInfo[playerid][pCarSlots], count);
SendClientMessage(playerid, COLOR_RED2, string);
SS(playerid, COLOR_RED2, "Nu vei putea conduce nicio masina pana cand nu vei vinde una din masinile tale.", "You can't use a vehicle until you sell one of your cars.");
BlockVehUse[playerid] = count;
}
else
{
BlockVehUse[playerid] = 0;
}
este pusa la publicul loadcarid
public LoadCarID(playerid)
{
for(new idd; idd < MAX_PERSONAL_VEHICLES; idd++)
{
PlayerInfo[playerid][pCarID][idd] = 0;
PlayerInfo[playerid][pCar][idd] = -1;
PlayerInfo[playerid][pCarModel][idd] = 0;
PlayerInfo[playerid][pCarLocX][idd] = 0.0;
PlayerInfo[playerid][pCarLocY][idd] = 0.0;
PlayerInfo[playerid][pCarLocZ][idd] = 0.0;
PlayerInfo[playerid][pCarAngle][idd] = 0.0;
PlayerInfo[playerid][pCarLLocX][idd] = 0.0;
PlayerInfo[playerid][pCarLLocY][idd] = 0.0;
PlayerInfo[playerid][pCarLLocZ][idd] = 0.0;
PlayerInfo[playerid][pCarAngle2][idd] = 0.0;
PlayerInfo[playerid][pCarBuyTime][idd] = 0;
PlayerInfo[playerid][pCarColor1][idd] = 1;
PlayerInfo[playerid][pCarColor2][idd] = 1;
PlayerInfo[playerid][pCarLock][idd] = 0;
PlayerInfo[playerid][pCarInsPrice][idd] = 0;
PlayerInfo[playerid][pCarIns][idd] = 0;
PlayerInfo[playerid][pCarKM][idd] = 0.0;
PlayerInfo[playerid][pCarKMLast][idd] = 0;
PlayerInfo[playerid][pCarVIP][idd] = 0;
PlayerInfo[playerid][pCarVipColor][idd] = 0;
PlayerInfo[playerid][pCarHP][idd] = 0.0;
PlayerInfo[playerid][pCarDamage1][idd] = 0;
PlayerInfo[playerid][pCarDamage2][idd] = 0;
PlayerInfo[playerid][pCarDamage3][idd] = 0;
PlayerInfo[playerid][pCarDamage4][idd] = 0;
PlayerInfo[playerid][pCarGas][idd] = 100;
PlayerInfo[playerid][pCarPaintJ][idd] = 6;
PlayerInfo[playerid][pCarBlock][idd] = 0;
CarVipName[playerid][idd] = "";
CarPlate[playerid][idd] = "";
CarOwner[playerid][idd] = "";
for(new s; s < 17; s++)
{
CarMod[playerid][idd] = 0;
}
}
new string[256],count;
format(string, sizeof(string), "SELECT * FROM `cars` WHERE `Owner`='%s'", PlayerInfo[playerid][pNormalName]);
new Cache: xd = mysql_query(SQL, string);
for(new i, j = cache_get_row_count (); i != j; ++i)
{
if(count < MAX_PERSONAL_VEHICLES)
{
PlayerInfo[playerid][pCar][count] = cache_get_field_content_int(i, "ID");
}
count++;
}
cache_delete(xd);
if(count > PlayerInfo[playerid][pCarSlots])
{
if(PlayerInfo[playerid][pLanguage] == 2) format(string, sizeof(string), "Ai prea multe masini! Poti avea maxim %d masini (tu ai %d).", PlayerInfo[playerid][pCarSlots], count);
else format(string, sizeof(string), "You have to many vehicles! You can have maximum %d cars (you have %d).", PlayerInfo[playerid][pCarSlots], count);
SendClientMessage(playerid, COLOR_RED2, string);
SS(playerid, COLOR_RED2, "Nu vei putea conduce nicio masina pana cand nu vei vinde una din masinile tale.", "You can't use a vehicle until you sell one of your cars.");
BlockVehUse[playerid] = count;
}
else
{
BlockVehUse[playerid] = 0;
}
LoadCar(playerid);
return 1;
}
Question
AndreiB
Salutare am intampinat o problema la serverul meu
Cand ma inregistrez pe el si dau /v imi apar acolo 2 masini o data am avut infernus si perenial,am sters contul si am facut altul mi-a dat un comet si zr-350
cum pot sa repar aceasta problema
la comanda /v apare asta
if(BlockVehUse[playerid] != 0) return SS(playerid, COLOR_RED2, "Ai prea multe masini, foloseste /sellcar si vinde una.", "You have to many vehicles, use /sellcar and sell one.");
si mai apare chestia asta cand ma inregistrez
if(count > PlayerInfo[playerid][pCarSlots])
{
if(PlayerInfo[playerid][pLanguage] == 2) format(string, sizeof(string), "Ai prea multe masini! Poti avea maxim %d masini (tu ai %d).", PlayerInfo[playerid][pCarSlots], count);
else format(string, sizeof(string), "You have to many vehicles! You can have maximum %d cars (you have %d).", PlayerInfo[playerid][pCarSlots], count);
SendClientMessage(playerid, COLOR_RED2, string);
SS(playerid, COLOR_RED2, "Nu vei putea conduce nicio masina pana cand nu vei vinde una din masinile tale.", "You can't use a vehicle until you sell one of your cars.");
BlockVehUse[playerid] = count;
}
else
{
BlockVehUse[playerid] = 0;
}
este pusa la publicul loadcarid
public LoadCarID(playerid)
{
for(new idd; idd < MAX_PERSONAL_VEHICLES; idd++)
{
PlayerInfo[playerid][pCarID][idd] = 0;
PlayerInfo[playerid][pCar][idd] = -1;
PlayerInfo[playerid][pCarModel][idd] = 0;
PlayerInfo[playerid][pCarLocX][idd] = 0.0;
PlayerInfo[playerid][pCarLocY][idd] = 0.0;
PlayerInfo[playerid][pCarLocZ][idd] = 0.0;
PlayerInfo[playerid][pCarAngle][idd] = 0.0;
PlayerInfo[playerid][pCarLLocX][idd] = 0.0;
PlayerInfo[playerid][pCarLLocY][idd] = 0.0;
PlayerInfo[playerid][pCarLLocZ][idd] = 0.0;
PlayerInfo[playerid][pCarAngle2][idd] = 0.0;
PlayerInfo[playerid][pCarBuyTime][idd] = 0;
PlayerInfo[playerid][pCarColor1][idd] = 1;
PlayerInfo[playerid][pCarColor2][idd] = 1;
PlayerInfo[playerid][pCarLock][idd] = 0;
PlayerInfo[playerid][pCarInsPrice][idd] = 0;
PlayerInfo[playerid][pCarIns][idd] = 0;
PlayerInfo[playerid][pCarKM][idd] = 0.0;
PlayerInfo[playerid][pCarKMLast][idd] = 0;
PlayerInfo[playerid][pCarVIP][idd] = 0;
PlayerInfo[playerid][pCarVipColor][idd] = 0;
PlayerInfo[playerid][pCarHP][idd] = 0.0;
PlayerInfo[playerid][pCarDamage1][idd] = 0;
PlayerInfo[playerid][pCarDamage2][idd] = 0;
PlayerInfo[playerid][pCarDamage3][idd] = 0;
PlayerInfo[playerid][pCarDamage4][idd] = 0;
PlayerInfo[playerid][pCarGas][idd] = 100;
PlayerInfo[playerid][pCarPaintJ][idd] = 6;
PlayerInfo[playerid][pCarBlock][idd] = 0;
CarVipName[playerid][idd] = "";
CarPlate[playerid][idd] = "";
CarOwner[playerid][idd] = "";
for(new s; s < 17; s++)
{
CarMod[playerid][idd] = 0;
}
}
new string[256],count;
format(string, sizeof(string), "SELECT * FROM `cars` WHERE `Owner`='%s'", PlayerInfo[playerid][pNormalName]);
new Cache: xd = mysql_query(SQL, string);
for(new i, j = cache_get_row_count (); i != j; ++i)
{
if(count < MAX_PERSONAL_VEHICLES)
{
PlayerInfo[playerid][pCar][count] = cache_get_field_content_int(i, "ID");
}
count++;
}
cache_delete(xd);
if(count > PlayerInfo[playerid][pCarSlots])
{
if(PlayerInfo[playerid][pLanguage] == 2) format(string, sizeof(string), "Ai prea multe masini! Poti avea maxim %d masini (tu ai %d).", PlayerInfo[playerid][pCarSlots], count);
else format(string, sizeof(string), "You have to many vehicles! You can have maximum %d cars (you have %d).", PlayerInfo[playerid][pCarSlots], count);
SendClientMessage(playerid, COLOR_RED2, string);
SS(playerid, COLOR_RED2, "Nu vei putea conduce nicio masina pana cand nu vei vinde una din masinile tale.", "You can't use a vehicle until you sell one of your cars.");
BlockVehUse[playerid] = count;
}
else
{
BlockVehUse[playerid] = 0;
}
LoadCar(playerid);
return 1;
}
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.