05.11.2012, 12:35
else if(!strfind(ministring,"buy"))
{
//SCM(playerid, COLOR_GREY, "Privremeno je onemogucena kupovina vozila, hvala na razumevanju!");
new car = 1;
new model = GetVehicleModel(idcar);
if(IsASalesVehicle(idcar))
{
if(PlayerInfo[playerid][pLevel] < 2)
{
SCM(playerid, COLOR_GREY, "Morate biti lvl2 da bi kupili kola!");
return 1;
}
if(PlayerInfo[playerid][pLevel] < 10 && PlayerInfo[playerid][pCarKey] != 9999)
{
SCM(playerid, COLOR_GREY, "Morate biti lvl10 da bi kupili druga kola!");
return 1;
}
if(PlayerInfo[playerid][pDonateRank] < 2 && PlayerInfo[playerid][pCarKey] != 9999 && PlayerInfo[playerid][pCarKey2] != 9999)
{
SCM(playerid, COLOR_GREY, "Morate biti Donatorski Rank lvl 2 da bi kupili drugo vozilo!");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != 9999 && PlayerInfo[playerid][pCarKey2] != 9999 && PlayerInfo[playerid][pCarKey3] != 9999)
{
SCM(playerid, COLOR_GREY,"* Dostigli ste limit u broju vozila!");
return 1;
}
else
if(GetPlayerMoney(playerid) >= GetVehiclePrice(idcar))
{
if(GetPlayerMoney(playerid) > ScriptMoney[playerid])
{
new y,m,d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string, sizeof(string), "[AntiCheat]: %s (%d) verovatno koristi Money Hack; Proverite ga odmah!! /fixmoney [playerID/DeoImena]", sendername,playerid);
SendGmMessage(COLOR_YELLOW, string);
format(string, sizeof(string), "[AntiCheat]:%s (%d) novac je popravljen ($%d).", sendername, playerid, (GetPlayerMoney(playerid) - ScriptMoney[playerid]));
SendAdminMessage(COLOR_LIGHTRED, string);
SetRealMoney(playerid, ScriptMoney[playerid]);
PlayerSuspicious[playerid] = 1;
PlayerMoneyHacking[playerid] = 1;
PlayerSuspiciousMoney[playerid] = (GetPlayerMoney(playerid) - ScriptMoney[playerid]);
PlayerGotSpottedRecently[playerid] = 1;
SetTimerEx("ResetAcWarn", 90000, 0, "i", playerid);
SCM(playerid, COLOR_CREAM, "* Transakcija stopirana, vase novcano stanje je neuravnotezeno, molimo vas pozovite admine.");
return 1;
}
if(PlayerInfo[playerid][pCarLic] == 1)
{
if(IsModelABoat(idcar))
{
SCM(playerid, COLOR_GREY, "Kucajte /buyboat da bi kupili brod.")
return 1;
}
for(new h = 1; h < sizeof(CarInfo); h++)
{
if(CarInfo[h][cOwned] == 0)
{
car = h;
h = 9999;
}
}
format(string, sizeof(string),"LARP/Vehicles/%d.ini",car)
dini_Create(string);
if(PlayerInfo[playerid][pCarKey] == 9999) { PlayerInfo[playerid][pCarKey] = car; }
else if(PlayerInfo[playerid][pCarKey2] == 9999) { PlayerInfo[playerid][pCarKey2] = car; }
else if(PlayerInfo[playerid][pCarKey3] == 9999) { PlayerInfo[playerid][pCarKey3] = car; }
else { return 1; }
CarInfo[car][cOwned] = 1;
strmid(CarInfo[car][cOwner], sendername, 0, strlen(sendername), 999);
SafeGivePlayerMoney(playerid,-GetVehiclePrice(idcar));
if(IsModelAPlane(idcar) || IsModelAHeli(idcar))
{
CarInfo[car][cLocationx] = 2113.8909;
CarInfo[car][cLocationy] = -2443.8997;
CarInfo[car][cLocationz] = 17.5469;
CarInfo[car][cAngle] = 359.2072;
CarInfo[car][cReg] = 0;
OnPropUpdate(4,car);
SCM(playerid, COLOR_YELLOW2, "Vas avion je isporucen na LS aerodrom!");
SCM(playerid, COLOR_YELLOW2, "Vas avion je otkljucan, mozete nekome platiti da ga doveze!");
SCM(playerid, COLOR_NICERED, "Napomena: Obavezno preparkirajte vas avion, inace ce biti prodat od strane administratora!");
GameTextForPlayer(playerid, "~p~Cestitamo~n~~w~Ne zaboravite da uzmete vas avion na ~b~Los Santos aerodromu!", 5000, 3);
}
else
{
CarInfo[car][cLocationx] = 1590.3740;
CarInfo[car][cLocationy] = -1026.0565;
CarInfo[car][cLocationz] = 23.9063;
CarInfo[car][cAngle] = 317.1649;
CarInfo[car][cReg] = 0;
OnPropUpdate(4,car);
SCM(playerid, COLOR_YELLOW2, "Vase vozilo je isporuceno na parking kod banke!");
SCM(playerid, COLOR_YELLOW2, "Vase vozilo je otkljucano, mozete platiti nekome da ih doveze do vas!");
SCM(playerid, COLOR_NICERED, "Napomena: Obavezno preparkirajte vase vozilo, inace ce biti prodato od strane administratora!");
GameTextForPlayer(playerid, "~p~Cestitamo~n~~w~Ne zaboravite da uzmete vasa kola na ~b~parkingu kod banke!", 5000, 3);
}
CarInfo[car][cModel] = model;
CarInfo[car][cVirWorld] = 0;
CarInfo[car][cPaintjob] = 999;
CarInfo[car][cColorOne] = 1;
CarInfo[car][cColorTwo] = 1;
CarInfo[car][cComponent0] = 0;
CarInfo[car][cComponent1] = 0;
CarInfo[car][cComponent2] = 0;
CarInfo[car][cComponent3] = 0;
CarInfo[car][cComponent4] = 0;
CarInfo[car][cComponent5] = 0;
CarInfo[car][cComponent6] = 0;
CarInfo[car][cComponent7] = 0;
CarInfo[car][cComponent8] = 0;
CarInfo[car][cComponent9] = 0;
CarInfo[car][cComponent10] = 0;
CarInfo[car][cComponent11] = 0;
CarInfo[car][cComponent12] = 0;
CarInfo[car][cComponent13] = 0;
CarInfo[car][cReg] = 0;
CarInfo[car][cKazna] = 0;
DestroyVehicle(car);
ownedcar[car] = CreateVehicle(CarInfo[car][cModel],CarInfo[car][cLocationx],CarInfo[car][cLocationy],CarInfo[car][cLocationz],90.0,1,1,60000);
PlayerPlayMusic(playerid);
SCM(playerid, COLOR_GRAD2, "Cestitamo na novoj kupovini!");
SCM(playerid, COLOR_GRAD2, "Kucajte /vozilo da vidite nove komande!");
gEngine[playerid] = 0;
engineOn[GetPlayerVehicleID(playerid)] = false;
new pass[24];
format(pass, sizeof(pass),"%d%d%d",random(9),random(9),random(9 ));
CarInfo[car][cCode] = strval(pass);
OnPropUpdate(4,car);
SetVehicleToRespawn(car);
OnPlayerUpdateEx(playerid);
}
else
{
SCM(playerid, COLOR_WHITE, "* Iz sigurnosnih razloga, potrebna vam je vozacka dozvola da bi kupili kola!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, " Nemate dovoljno novca kod sebe ! ");
return 1;
}
}
}
Hi. I have a server with a kind of car mode that a player can have 2 vehicles, boat and VIPs can have 3 vehicles.
My question is how can I make that owner (133 has unlimited number of vehicles Thanks...
{
//SCM(playerid, COLOR_GREY, "Privremeno je onemogucena kupovina vozila, hvala na razumevanju!");
new car = 1;
new model = GetVehicleModel(idcar);
if(IsASalesVehicle(idcar))
{
if(PlayerInfo[playerid][pLevel] < 2)
{
SCM(playerid, COLOR_GREY, "Morate biti lvl2 da bi kupili kola!");
return 1;
}
if(PlayerInfo[playerid][pLevel] < 10 && PlayerInfo[playerid][pCarKey] != 9999)
{
SCM(playerid, COLOR_GREY, "Morate biti lvl10 da bi kupili druga kola!");
return 1;
}
if(PlayerInfo[playerid][pDonateRank] < 2 && PlayerInfo[playerid][pCarKey] != 9999 && PlayerInfo[playerid][pCarKey2] != 9999)
{
SCM(playerid, COLOR_GREY, "Morate biti Donatorski Rank lvl 2 da bi kupili drugo vozilo!");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != 9999 && PlayerInfo[playerid][pCarKey2] != 9999 && PlayerInfo[playerid][pCarKey3] != 9999)
{
SCM(playerid, COLOR_GREY,"* Dostigli ste limit u broju vozila!");
return 1;
}
else
if(GetPlayerMoney(playerid) >= GetVehiclePrice(idcar))
{
if(GetPlayerMoney(playerid) > ScriptMoney[playerid])
{
new y,m,d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string, sizeof(string), "[AntiCheat]: %s (%d) verovatno koristi Money Hack; Proverite ga odmah!! /fixmoney [playerID/DeoImena]", sendername,playerid);
SendGmMessage(COLOR_YELLOW, string);
format(string, sizeof(string), "[AntiCheat]:%s (%d) novac je popravljen ($%d).", sendername, playerid, (GetPlayerMoney(playerid) - ScriptMoney[playerid]));
SendAdminMessage(COLOR_LIGHTRED, string);
SetRealMoney(playerid, ScriptMoney[playerid]);
PlayerSuspicious[playerid] = 1;
PlayerMoneyHacking[playerid] = 1;
PlayerSuspiciousMoney[playerid] = (GetPlayerMoney(playerid) - ScriptMoney[playerid]);
PlayerGotSpottedRecently[playerid] = 1;
SetTimerEx("ResetAcWarn", 90000, 0, "i", playerid);
SCM(playerid, COLOR_CREAM, "* Transakcija stopirana, vase novcano stanje je neuravnotezeno, molimo vas pozovite admine.");
return 1;
}
if(PlayerInfo[playerid][pCarLic] == 1)
{
if(IsModelABoat(idcar))
{
SCM(playerid, COLOR_GREY, "Kucajte /buyboat da bi kupili brod.")
return 1;
}
for(new h = 1; h < sizeof(CarInfo); h++)
{
if(CarInfo[h][cOwned] == 0)
{
car = h;
h = 9999;
}
}
format(string, sizeof(string),"LARP/Vehicles/%d.ini",car)
dini_Create(string);
if(PlayerInfo[playerid][pCarKey] == 9999) { PlayerInfo[playerid][pCarKey] = car; }
else if(PlayerInfo[playerid][pCarKey2] == 9999) { PlayerInfo[playerid][pCarKey2] = car; }
else if(PlayerInfo[playerid][pCarKey3] == 9999) { PlayerInfo[playerid][pCarKey3] = car; }
else { return 1; }
CarInfo[car][cOwned] = 1;
strmid(CarInfo[car][cOwner], sendername, 0, strlen(sendername), 999);
SafeGivePlayerMoney(playerid,-GetVehiclePrice(idcar));
if(IsModelAPlane(idcar) || IsModelAHeli(idcar))
{
CarInfo[car][cLocationx] = 2113.8909;
CarInfo[car][cLocationy] = -2443.8997;
CarInfo[car][cLocationz] = 17.5469;
CarInfo[car][cAngle] = 359.2072;
CarInfo[car][cReg] = 0;
OnPropUpdate(4,car);
SCM(playerid, COLOR_YELLOW2, "Vas avion je isporucen na LS aerodrom!");
SCM(playerid, COLOR_YELLOW2, "Vas avion je otkljucan, mozete nekome platiti da ga doveze!");
SCM(playerid, COLOR_NICERED, "Napomena: Obavezno preparkirajte vas avion, inace ce biti prodat od strane administratora!");
GameTextForPlayer(playerid, "~p~Cestitamo~n~~w~Ne zaboravite da uzmete vas avion na ~b~Los Santos aerodromu!", 5000, 3);
}
else
{
CarInfo[car][cLocationx] = 1590.3740;
CarInfo[car][cLocationy] = -1026.0565;
CarInfo[car][cLocationz] = 23.9063;
CarInfo[car][cAngle] = 317.1649;
CarInfo[car][cReg] = 0;
OnPropUpdate(4,car);
SCM(playerid, COLOR_YELLOW2, "Vase vozilo je isporuceno na parking kod banke!");
SCM(playerid, COLOR_YELLOW2, "Vase vozilo je otkljucano, mozete platiti nekome da ih doveze do vas!");
SCM(playerid, COLOR_NICERED, "Napomena: Obavezno preparkirajte vase vozilo, inace ce biti prodato od strane administratora!");
GameTextForPlayer(playerid, "~p~Cestitamo~n~~w~Ne zaboravite da uzmete vasa kola na ~b~parkingu kod banke!", 5000, 3);
}
CarInfo[car][cModel] = model;
CarInfo[car][cVirWorld] = 0;
CarInfo[car][cPaintjob] = 999;
CarInfo[car][cColorOne] = 1;
CarInfo[car][cColorTwo] = 1;
CarInfo[car][cComponent0] = 0;
CarInfo[car][cComponent1] = 0;
CarInfo[car][cComponent2] = 0;
CarInfo[car][cComponent3] = 0;
CarInfo[car][cComponent4] = 0;
CarInfo[car][cComponent5] = 0;
CarInfo[car][cComponent6] = 0;
CarInfo[car][cComponent7] = 0;
CarInfo[car][cComponent8] = 0;
CarInfo[car][cComponent9] = 0;
CarInfo[car][cComponent10] = 0;
CarInfo[car][cComponent11] = 0;
CarInfo[car][cComponent12] = 0;
CarInfo[car][cComponent13] = 0;
CarInfo[car][cReg] = 0;
CarInfo[car][cKazna] = 0;
DestroyVehicle(car);
ownedcar[car] = CreateVehicle(CarInfo[car][cModel],CarInfo[car][cLocationx],CarInfo[car][cLocationy],CarInfo[car][cLocationz],90.0,1,1,60000);
PlayerPlayMusic(playerid);
SCM(playerid, COLOR_GRAD2, "Cestitamo na novoj kupovini!");
SCM(playerid, COLOR_GRAD2, "Kucajte /vozilo da vidite nove komande!");
gEngine[playerid] = 0;
engineOn[GetPlayerVehicleID(playerid)] = false;
new pass[24];
format(pass, sizeof(pass),"%d%d%d",random(9),random(9),random(9 ));
CarInfo[car][cCode] = strval(pass);
OnPropUpdate(4,car);
SetVehicleToRespawn(car);
OnPlayerUpdateEx(playerid);
}
else
{
SCM(playerid, COLOR_WHITE, "* Iz sigurnosnih razloga, potrebna vam je vozacka dozvola da bi kupili kola!");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, " Nemate dovoljno novca kod sebe ! ");
return 1;
}
}
}
Hi. I have a server with a kind of car mode that a player can have 2 vehicles, boat and VIPs can have 3 vehicles.
My question is how can I make that owner (133 has unlimited number of vehicles Thanks...