PHP код:
#include <a_samp>
new VehPublico[3];
new VehicleNames[][] =
{
"Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
"Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
"Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
"Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
"Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
"Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
"Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
"Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
"Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
"Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
"Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
"Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
"Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
"Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
"Blista Compact", "Police Maverick", "Boxville", "Benson", "Mesa", "RC Goblin",
"Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
"Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
"Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
"FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
"Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
"Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
"Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
"Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
"Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
"Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
"Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
"Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
"News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
"Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
"Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
"Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
"Tiller", "Utility Trailer"
};
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnGameModeInit()
{
VehPublico[0] = CreateVehicle(411, 0000.0000,0000.0000,0000.0000,0000.0000, -1, -1, 99999);
VehPublico[1] = CreateVehicle(411, 0000.0000,0000.0000,0000.0000,0000.0000, -1, -1, 99999);
VehPublico[2] = CreateVehicle(411, 0000.0000,0000.0000,0000.0000,0000.0000, -1, -1, 99999);
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new str[124], Text3D:VehPublicoText3D[MAX_VEHICLES];
for(new i; i < MAX_VEHICLES; i++)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
if(GetPlayerVehicleID(playerid) == VehPublico[0] || VehPublico[1] || VehPublico[2]) {
if(GetPlayerMoney(playerid) >= 400) {
format(str, sizeof(str), "{7CFC00}%s\n{FFFFFF}•• Veнculo Publico ••", VehicleNames[GetVehicleModel(vehicleid)-400]);
VehPublicoText3D[vehicleid] = Create3DTextLabel(str, 0xFFFFFFFF, 0.0, 0.0, 0.0, 10.0, 0);
Attach3DTextLabelToVehicle(VehPublicoText3D[vehicleid], GetPlayerVehicleID(playerid), 0.0, 0.0, 0.0);
GivePlayerMoney(playerid, -400);
} else {
SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Vocк nгo tem dinheiro suficiente para alugar este veнculo pъblico por R$400");
RemovePlayerFromVehicle(playerid);
}
}
}
}
return 1;
}