pawn Код:
#include <a_samp>
new Menu:CarMenu;
new Menu:CarMenu2;
new Menu:CarMenu3;
new car[MAX_PLAYERS];
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xCC0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#pragma tabsize 0
// Hoi! Wat doe jij hier?
// CJ Met zijn supercoole snor does not approYou Have To Be Rcon Admin To Use This Commande!
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Auto menu voor Vakonov server ");
print(" Door @nickbouwhuis ");
print("--------------------------------------\n");
CarMenu = CreateMenu("Kies maar!", 1, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(CarMenu, 0, "Infernus (:D)");
AddMenuItem(CarMenu, 0, "Sultan");
AddMenuItem(CarMenu, 0, "Blade");
AddMenuItem(CarMenu, 0, "Cheetah");
AddMenuItem(CarMenu, 0, "Elegy");
AddMenuItem(CarMenu, 0, "Comet");
AddMenuItem(CarMenu, 0, "-- Motoren en fietsen --");
AddMenuItem(CarMenu, 0, "NRG-500");
AddMenuItem(CarMenu, 0, "Quad");
AddMenuItem(CarMenu, 0, "PCJ-600");
AddMenuItem(CarMenu, 0, "Pizza scooter");
AddMenuItem(CarMenu, 0, "Volgende");
CarMenu2 = CreateMenu("Kies maar!", 1, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(CarMenu2, 0, "Go Kart");
AddMenuItem(CarMenu2, 0, "Dirt Bike");
AddMenuItem(CarMenu2, 0, "Police bike");
AddMenuItem(CarMenu2, 0, "Police Ranger");
AddMenuItem(CarMenu2, 0, "Police car (LVPD)");
AddMenuItem(CarMenu2, 0, "Freeway");
AddMenuItem(CarMenu2, 0, "BMX");
AddMenuItem(CarMenu2, 0, "Rotfiets");
AddMenuItem(CarMenu2, 0, "MtBike");
AddMenuItem(CarMenu2, 0, "Volgende");
CarMenu3 = CreateMenu("Kies maar!", 1, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(CarMenu3, 0, "Vortex");
AddMenuItem(CarMenu3, 0, "Monster Truck");
AddMenuItem(CarMenu3, 0, "Monster Truck 2");
AddMenuItem(CarMenu3, 0, "Cabbie");
AddMenuItem(CarMenu2, 0, "-- Vliegtuigen en overige --");
AddMenuItem(CarMenu2, 0, "Shamal");
AddMenuItem(CarMenu2, 0, "Hydra");
AddMenuItem(CarMenu2, 0, "Hunter");
AddMenuItem(CarMenu3, 0, "Terug");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Hoi");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/v",true)==0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
ShowMenuForPlayer(CarMenu,playerid);
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"Je zit al in een voertuig!");
}
return 1;
}
if (strcmp(cmdtext, "/auto",true)==0)
{
SendClientMessage(playerid,COLOR_YELLOW,"Het nieuwe commando is /v (V is voor Voertuig)");
return 1;}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == CarMenu)
{
switch(row)
{
case 0: //infernus
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(411,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Infernus!");
SendClientMessage(playerid, 0xFFFFFFFF, "Maak 'm wel geel he!!");
}
case 1: //armour
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(560,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Sultan");
}
case 2: //heal+armour
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(536,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Blade");
}
case 3: //healx2
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(415,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Cheetah");
}
case 4: //armourx2
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(562,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Elegy");
}
case 5: //M4
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(480,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Comet");
}
case 6: //bikes
{
SendClientMessage(playerid,0xFFFFFFFF,"Hahah. Dit is niks :)");
ShowMenuForPlayer(CarMenu,playerid);
}
case 7: //M4
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(522,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een NRG-500");
}
case 8: //M4
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(471,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Quad_bike");
}
case 9: //next
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(461,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een PCJ-600");
}
case 10: //pcj-600
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(448,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een pizza scootertje.");
SendClientMessage(playerid, 0xFFFFFFFF, "Snel! De pizza's worden koud!");
}
case 11: //other vehicles
{
ShowMenuForPlayer(CarMenu2,playerid);
}
}
}
if(CurrentMenu == CarMenu2)
{
switch(row)
{
case 0: //go kart
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(571,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Go Kart");
}
case 1: //dirt bike
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(468,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Dirt Bike");
}
case 2: //police bike
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(523,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Police Bike");
}
case 3: //police ranger
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(599,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Police Ranger");
}
case 4: //police car
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(598,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een LVPD Politiewagen");
}
case 5:
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(481,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een BMX");
}
case 6:
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(509,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een vervelde rotfiets");
SendClientMessage(playerid, 0xFFFFFFFF, "Verder alles goed?");
}
case 7:
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(510,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Mountain Bike");
}
}
case 8:
{
ShowMenuForPlayer(CarMenu3,playerid);
}
}
}
if(CurrentMenu == CarMenu3)
{
switch(row)
{
case 0:
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(539,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Vortex");
}
case 1:
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(444,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Monster Truck");
}
case 2:
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(556,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Monster Truck No.2");
}
case 3:
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(438,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Cabbie");
}
case 4: // Planes Jets etc
{
SendClientMessage(playerid,0xFFFFFFFF,"Wasmetjou?");
}
case 5:
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(519,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Shamal");
}
case 6:
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(520,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Hydra");
}
case 7:
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerFacingAngle(playerid,a);
GetPlayerPos(playerid, x, y, z);
if(car[playerid] != INVALID_VEHICLE_ID) DestroyVehicle(car[playerid]);
car[playerid] = CreateVehicle(425,x,y,z+4,a,-1,-1,30000);
PutPlayerInVehicle(playerid, car[playerid], 0);
SendClientMessage(playerid, 0xFFFFFFFF, "Je selecteerde een Hunter");
case 8:
{
ShowMenuForPlayer(CarMenu2,playerid);
}
}
}
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}