if(strcmp(cmd, "/jobpaper", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (!PlayerToPoint(15, playerid,811.5231,-1348.4441,-0.5078))//centerpoint 24-7
{
SendClientMessage(playerid, COLOR_GRAD2, "Go to the license shop, near Alhambra");
SendClientMessage(playerid, COLOR_GRAD2, "Sit in the chair, and buy away");
return 1;
}
if(IsValidMenu(Menu2)) //Double Check the menu has been created to avoid Crash.
{
ShowMenuForPlayer(Menu2, playerid); //Show the Menu to the player
}
}
return 1;
}
Menu1 = CreateMenu("License Office",1,10,150,300); //Creates the Menu
SetMenuColumnHeader(Menu1, 0, "License Office"); //Sets the Title Above the Collumn
AddMenuItem(Menu1,0,"Driving $8000"); //Adds an Item to a Menu
AddMenuItem(Menu1,0,"Flying $12500"); //Adds an Item to a Menu
AddMenuItem(Menu1,0,"Sailing $4000"); //Adds an Item to a Menu
AddMenuItem(Menu1,0,"Fishing $2000"); //Adds an Item to a Menu
AddMenuItem(Menu1,0,"Weapon $3000"); //Adds an Item to a Menu
AddMenuItem(Menu1,0,"Passport $4000"); //Adds an Item to a Menu
Menu2 = CreateMenu("Job Centre",1,10,150,300); //Creates the Menu
SetMenuColumnHeader(Menu2, 0, "Employment Paper"); //Sets the Title Above the Collumn
AddMenuItem(Menu2,0,"Spy"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"Lawyer"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"Mechanic"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"News Reporter"); //Adds an Item to a menu
AddMenuItem(Menu2,0,"Car Salesmen"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"Medic"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"Boxer"); //Adds an Item to a Menu
/*AddMenuItem(Menu2,0,"Bus Driver"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"Paper Boy"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"Trucker"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"Stuntman"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"Waiter"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"Chauffeur"); //Adds an Item to a Menu
AddMenuItem(Menu2,0,"Taxi Driver"); //Adds an Item to a Menu*/
if(Current == Menu2) //If the Open Menu is the One we created.
{
switch(row) //Make a Switch Statement to Cycle through the Rows of the menu.
{
case 0:{
if(PlayerInfo[playerid][pJob] == 0)
{
GettingJob[playerid] = 1;
PlayerInfo[playerid][pJob] = GettingJob[playerid];
GettingJob[playerid] = 0;
PlayerInfo[playerid][pJob] = 1;
SendClientMessage(playerid, COLOR_GRAD5, "Congrats! You are now a spy.");
SendClientMessage(playerid, COLOR_YELLOW, "Type /help for your job commands.");
return 1;
}
else if(PlayerInfo[playerid][pJob] > 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You already have a job, /quitjob first.");
}
}
case 1:{
if(PlayerInfo[playerid][pJob] == 0)
{
PlayerInfo[playerid][pJob] = 1;
SendClientMessage(playerid, COLOR_GRAD5, "Congrats! You are now a spy.");
SendClientMessage(playerid, COLOR_YELLOW, "Type /help for your job commands.");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You already have a job, /quitjob first.");
}
}
case 2:{
if (GetPlayerMoney(playerid) > 4000)
{
GivePlayerMoney(playerid,-4000);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pBoatLic] = 1;
SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by typing /licenses");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
}
}
case 3:{
if (GetPlayerMoney(playerid) > 2000)
{
GivePlayerMoney(playerid,-2000);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pFishLic] = 1;
SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by typing /licenses");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
}
}
case 4:{
if (GetPlayerMoney(playerid) > 3000)
{
GivePlayerMoney(playerid,-3000);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pGunLic] = 1;
SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by typing /licenses");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
}
}
case 5:{
if (GetPlayerMoney(playerid) > 4000)
{
GivePlayerMoney(playerid,-4000);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pPassport] = 2;
SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by typing /licenses");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
}
}
}
}
}
return 1;
}