Код:
zcmd(rentarveh, playerid, params[]){
new idcar = GetPlayerVehicleID(playerid);
if(HireKey[playerid] != 9999) return Message(playerid, COLOR_GREY, "Ya has rentado un vehнculo, utiliza /desrentarveh");
if(Hire_Vehicle(idcar)){
new carprice, found;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(HireKey[i] == idcar)
{
found = 1;
Message(playerid, COLOR_GRAD2, "Este vehнculo ya estб rentado");
break;
}
}
if(found != 1)
{
switch(idcar)
{
case 35..38,125..132: { carprice = 400; }
case 133..143: { carprice = 620; }
case 144: { carprice = 680; }
case 145..147: { carprice = 800; }
case 252,253,257: { carprice = 1400; }
case 254,255: { carprice = 1200; }
case 256: { carprice = 1000; }
case 258..267: { carprice = 200; }
}
if(GetPlayerMoney(playerid) > carprice)
{
new string[50];
Bought(playerid, carprice);
switch(idcar){
case 35..38,125..147: Till(14, carprice);
case 252..257: Till(15, carprice);
case 258..267: Till(16, carprice);
}
format(string, sizeof(string), "* %s renta un vehнculo.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Message(playerid, COLOR_WHITE, "Este vehнculo serб tuyo hasta que te desconectes!");
Message(playerid, COLOR_WHITE, "Utiliza /desrentarveh cuando no lo necesites (Devoluciуn: 100$)");
HireKey[playerid] = idcar;
}
}
} else Message(playerid, COLOR_GRAD2, "ЎNo estбs en un vehнculo de renta!");
return 1;
}
Y aca las bicis:
Код:
AddStaticVehicleEx(510,1734.0199,-1863.8273,13.1828,359.8940,151,151,60000);
AddStaticVehicleEx(510,1732.0968,-1863.8464,13.1830,2.8231,65,65,60000);
AddStaticVehicleEx(510,1730.5598,-1863.7780,13.1822,4.1875,4,4,60000);
AddStaticVehicleEx(510,1728.7006,-1870.8092,13.1716,358.0268,0,0,60000);
AddStaticVehicleEx(510,1728.5775,-1868.2179,13.1771,352.7792,1,1,60000);
AddStaticVehicleEx(510,1727.4672,-1870.9015,13.1716,0.2736,2,2,60000);
AddStaticVehicleEx(510,1727.3544,-1868.2091,13.1774,4.0482,126,126,60000);
AddStaticVehicleEx(510,1729.3662,-1863.9600,13.1828,357.7525,6,6,60000);
AddStaticVehicleEx(510,1750.2961,-1862.5370,13.1819,3.4593,7,7,60000)
AddStaticVehicleEx(510,1747.7045,-1862.5844,13.1843,1.2277,3,3,60000);
Saludos.