#include <a_samp>
new Menu:navi1;
#define COLOR_RED 0xAA3333AA
#define COLOR_GREEN 0x33AA33AA
public OnFilterScriptInit() {
for(new playerid=0; playerid<GetMaxPlayers(); playerid++)
{
TogglePlayerControllable(playerid,1);
}
}
public OnFilterScriptExit() {
}
public OnGameModeInit()
{
navi1=Menu:CreateMenu("~w~Navigation",1,130,150,300);
AddMenuItem(navi1,0," ADAC LS"); //0
AddMenuItem(navi1,0," ADAC LV"); //1
AddMenuItem(navi1,0," ADAC SF"); //2
AddMenuItem(navi1,0," Biker"); //3
AddMenuItem(navi1,0," Biker-Shop"); //4
AddMenuItem(navi1,0," Boot-Job"); //5
AddMenuItem(navi1,0," Taxifahrer LS"); //6
AddMenuItem(navi1,0," Taxifahrer LV"); //7
AddMenuItem(navi1,0," Post LS"); //8
AddMenuItem(navi1,0," Post LV"); //9
AddMenuItem(navi1,0," Post SF"); //10
AddMenuItem(navi1,0,"Abbruch"); //11
return 0;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:Now;
Now = GetPlayerMenu(playerid);
if(Now == navi1) {
TogglePlayerControllable(playerid,false);
HideMenuForPlayer(navi1,playerid);
switch(row)
{
case 0: {
SetPlayerCheckpoint(playerid,-79.9094,-1135.0229,1.0781,5); // ADAC LS
HideMenuForPlayer(navi1, playerid);
}
case 1: {
SetPlayerCheckpoint(playerid,1886.0837,2339.3083,10.8203,5); // ADAC LV
HideMenuForPlayer(navi1, playerid);
}
case 2: {
SetPlayerCheckpoint(playerid,-2226.6082,286.9214,35.3203,5); // ADAC SF
HideMenuForPlayer(navi1, playerid);
}
case 3: {
SetPlayerCheckpoint(playerid,504.8405,-69.1731,998.7578,5); // BIKER PICKUP
HideMenuForPlayer(navi1, playerid);
}
case 4: {
SetPlayerCheckpoint(playerid,2131.8550,-1150.1294,24.1917,5); // Biker Shop
HideMenuForPlayer(navi1, playerid);
}
case 5: {
SetPlayerCheckpoint(playerid,-2190.0911,2414.0591,5.1563,5); // BOOT JOB
HideMenuForPlayer(navi1, playerid);
}
case 6: {
SetPlayerCheckpoint(playerid,1771.2418,-1907.2025,13.5552,5); // Taxi HQ LS
HideMenuForPlayer(navi1, playerid);
}
case 7: {
SetPlayerCheckpoint(playerid,1947.2200,2068.9106,10.8203,5); // Taxi LV
HideMenuForPlayer(navi1, playerid);
}
case 8: {
SetPlayerCheckpoint(playerid,1117.9919,-1249.7778,15.9281,5); // Post LS
HideMenuForPlayer(navi1, playerid);
}
case 9: {
SetPlayerCheckpoint(playerid,1680.8837,1760.2552,10.8285,5); // Post LV
HideMenuForPlayer(navi1, playerid);
}
case 10: {
SetPlayerCheckpoint(playerid,-2522.6191,1214.9878,37.4283,5); // Post SF
HideMenuForPlayer(navi1, playerid);
}
case 11: {
HideMenuForPlayer(navi1, playerid);
}
}
}
return 1;
}
public OnPlayerSpawn(playerid)
{
}
public OnGameModeExit()
{<
DestroyMenu(navi1);
return 1;
}
public OnPlayerExitedMenu(playerid)
{
TogglePlayerControllable(playerid,1);
HideMenuForPlayer(navi1, playerid);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/navi", true)) {
HideMenuForPlayer(navi1, playerid);
return 1;
}
return 0;
}
Alles anzeigen