Код:
#include <a_samp>
new Menu:Menu500;
new Menu:Menu501;
new Menu:Menu502;
new Menu:Menu503;
new Menu:Menu504;
public OnFilterScriptInit()
{
Menu500 = CreateMenu("Roadblock",1,10,150,300); //Creates the Menu
SetMenuColumnHeader(Menu500, 0, "Select a Function"); //Sets the Title Above the Collumn
AddMenuItem(Menu500,0,"Place"); //Adds an Item to a Menu
AddMenuItem(Menu500,0,"Remove Set"); //Adds an Item to a Menu
Menu501 = CreateMenu("Roablock",1,10,150,300); //Creates the Menu
SetMenuColumnHeader(Menu501, 0, "Select Type"); //Sets the Title Above the Collumn
AddMenuItem(Menu501,0,"Large (Highway)"); //Adds an Item to a Menu
AddMenuItem(Menu501,0,"Medium (2-Laned Road)"); //Adds an Item to a Menu
Menu502 = CreateMenu("Roadblock",1,10,150,300); //Creates the Menu
SetMenuColumnHeader(Menu502, 0, "Select a set to Delete"); //Sets the Title Above the Collumn
AddMenuItem(Menu502,0,"Set 1"); //Adds an Item to a Menu
AddMenuItem(Menu502,0,"Set 2"); //Adds an Item to a Menu
AddMenuItem(Menu502,0,"Set 3"); //Adds an Item to a Menu
AddMenuItem(Menu502,0,"Set 4"); //Adds an Item to a Menu
AddMenuItem(Menu502,0,"Set 5"); //Adds an Item to a Menu
Menu503 = CreateMenu("Roadblock",1,10,150,300); //Creates the Menu
SetMenuColumnHeader(Menu503, 0, "Select a set ID"); //Sets the Title Above the Collumn
AddMenuItem(Menu503,0,"Set 1"); //Adds an Item to a Menu
AddMenuItem(Menu503,0,"Set 2"); //Adds an Item to a Menu
AddMenuItem(Menu503,0,"Set 3"); //Adds an Item to a Menu
AddMenuItem(Menu503,0,"Set 4"); //Adds an Item to a Menu
AddMenuItem(Menu503,0,"Set 5"); //Adds an Item to a Menu
Menu504 = CreateMenu("Roadblock",1,10,150,300); //Creates the Menu
SetMenuColumnHeader(Menu504, 0, "Select a set ID"); //Sets the Title Above the Collumn
AddMenuItem(Menu504,0,"Set 1"); //Adds an Item to a Menu
AddMenuItem(Menu504,0,"Set 2"); //Adds an Item to a Menu
AddMenuItem(Menu504,0,"Set 3"); //Adds an Item to a Menu
AddMenuItem(Menu504,0,"Set 4"); //Adds an Item to a Menu
AddMenuItem(Menu504,0,"Set 5"); //Adds an Item to a Menu
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/roadblock", true)) {
{
ShowMenuForPlayer(menu500, playerid);
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
if(Currentmenu == Menu500) // ROAD BLOCK
{
switch(row)
{
case 0:
{
ShowMenuForPlayer(menu501, playerid);//CREATE
}
case 1:
{
ShowMenuForPlayer(menu502, playerid);//DESTROY
}
}
TogglePlayerControllable(playerid, 1);
}
if(Currentmenu == Menu501)//create
{
switch(row)
{
case 0:
{
ShowMenuForPlayer(menu503, playerid);//Large
}
case 1:
{
ShowMenuForPlayer(menu504, playerid);//Medium
}
}
TogglePlayerControllable(playerid, 1);
}
if(Currentmenu == Menu502) // Delete a Set
{
switch(row)
{
case 0://set 1
{
SendClientMessage(playerid, COLOR_WHITE, "Error");
}
case 1://set 2
{
SendClientMessage(playerid, COLOR_WHITE, "Error");
}
case 2://set 3
{
SendClientMessage(playerid, COLOR_WHITE, "Error");
}
case 3://set 4
{
SendClientMessage(playerid, COLOR_WHITE, "Error");
}
case 4://set 5
{
SendClientMessage(playerid, COLOR_WHITE, "Error");
}
}
TogglePlayerControllable(playerid, 1);
}
if(Currentmenu == Menu503) //medium
new roadblockONE;
new roadblockTWO;
new roadblockTHREE;
new roadblockFOUR;
new roadblockFIVE;
{
switch(row)
{
case 0://set 1
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ang;
GetPlayerFacingAngle(playerid, ang);
roadblockONE = CreateObject(978, x, y, z-6, 0, 0, ang+180);
MoveObject(roadblockONE, x, y, z, 1);
SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #1)");
}
case 1://set 2
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ang;
GetPlayerFacingAngle(playerid, ang);
roadblockTWO = CreateObject(978, x, y, z-6, 0, 0, ang+180);
MoveObject(roadblockTWO, x, y, z, 1);
SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #2)");
}
case 2://set 3
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ang;
GetPlayerFacingAngle(playerid, ang);
roadblockTHREE = CreateObject(978, x, y, z-6, 0, 0, ang+180);
MoveObject(roadblockTHREE, x, y, z, 1);
SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #3)");
}
case 3://set 4
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ang;
GetPlayerFacingAngle(playerid, ang);
roadblockFOUR = CreateObject(978, x, y, z-6, 0, 0, ang+180);
MoveObject(roadblockFOUR, x, y, z, 1);
SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #4)");
}
case 4://set 5
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ang;
GetPlayerFacingAngle(playerid, ang);
roadblockFIVE = CreateObject(978, x, y, z-6, 0, 0, ang+180);
MoveObject(roadblockFIVE, x, y, z, 1);
SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #5)");
}
}
TogglePlayerControllable(playerid, 1);
}
if(Currentmenu == Menu504) // Medium
new roadblockONEA;
new roadblockTWOA;
new roadblockTHREEA;
new roadblockFOURA;
new roadblockFIVEA;
new roadblockONEB;
new roadblockTWOB;
new roadblockTHREEB;
new roadblockFOURB;
new roadblockFIVEB;
{
switch(row)
{
case 0://set 1
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ang;
GetPlayerFacingAngle(playerid, ang);
roadblockONEA = CreateObject(978, x, y, z-2.5, 0, 0, ang);
MoveObject(roadblockONEA, x, y, z, 1);
roadblockONEB = CreateObject(979, x, y, z-2.5, 0, 0, ang+180);
MoveObject(roadblockONEB, x, y, z, 1);
SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #1)");
}
case 1://set 2
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ang;
GetPlayerFacingAngle(playerid, ang);
roadblockTWOA = CreateObject(978, x, y, z-2.5, 0, 0, ang);
MoveObject(roadblockTWOA, x, y, z, 1);
roadblockTWOB = CreateObject(979, x, y, z-2.5, 0, 0, ang+180);
MoveObject(roadblockTWOB, x, y, z, 1);
SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #2)");
}
case 2://set 3
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ang;
GetPlayerFacingAngle(playerid, ang);
roadblockTHREEA = CreateObject(978, x, y, z-2.5, 0, 0, ang);
MoveObject(roadblockTHREEA, x, y, z, 1);
roadblockTHREEB = CreateObject(979, x, y, z-2.5, 0, 0, ang+180);
MoveObject(roadblockTHREEB, x, y, z, 1);
SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #3)");
}
case 3://set 4
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ang;
GetPlayerFacingAngle(playerid, ang);
roadblockFOURA = CreateObject(978, x, y, z-2.5, 0, 0, ang);
MoveObject(roadblockFOURA, x, y, z, 1);
roadblockFOURB = CreateObject(979, x, y, z-2.5, 0, 0, ang+180);
MoveObject(roadblockFOURB, x, y, z, 1);
SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #4)");
}
case 4://set 5
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ang;
GetPlayerFacingAngle(playerid, ang);
roadblockFIVEA = CreateObject(978, x, y, z-2.5, 0, 0, ang);
MoveObject(roadblockFIVEA, x, y, z, 1);
roadblockFIVEB = CreateObject(979, x, y, z-2.5, 0, 0, ang+180);
MoveObject(roadblockFIVEB, x, y, z, 1);
SendClientMessage(playerid, COLOR_GREY, "Roadblock deployed (set #5)");
}
}
TogglePlayerControllable(playerid, 1);
}
return 0;
}
i know, just after i posted it i went back to add it... srry
i dont see anything i missed, its the same as all my other menus... i think...