Yes i found this on here and it is told to be broke and un finshed i want it where you can go up to a npc and type /buy and brings up list jobs u see
1.Waiter 2. janitor and you press 1 makes you waiter, reason i want this so i dont have to give new people e jobs and i can deal with bigger issues
Code:
public plugin_init() {
register_clcmd("employment","menu_mymenu");
register_menucmd( register_menuid( MENU_MYMENU_TITLE ) , 1023, "_menu_mymenu");
register_menucmd( register_menuid( MENU_MYMENU2_TITLE ) , 1023, "_menu_mymenu2");
}
public menu_mymenu( id ) {
new szMenu[512], iLen;
new iKeys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<8)|(1<<9);
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU_TITLE );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU_1 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU_2 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU_3 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU_4 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU_5 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU_6 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU_7 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU_8 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU_NEXT );
iLen += format( szMenu[iLen], 512 - iLen, MENU_CANCEL );
show_menu( id, iKeys, szMenu );
return PLUGIN_HANDLED;
}
public cmd_mymenu(id) {
menu_mymenu(id);
return PLUGIN_HANDLED;
}
public _menu_mymenu( id, iKey ) {
switch ( iKey )
{
case 0: jobchange(id,"Banker", "10");
case 1: jobchange(id,"Waiter", "7");
case 2: jobchange(id,"Clerk", "8");
case 3: jobchange(id,"Gunsec", "7");
case 4: jobchange(id,"Scout", "7");
case 5: jobchange(id,"Bodyguard", "7");
case 6: jobchange(id,"Cop", "9");
case 7: jobchange(id,"Bouncer", "7");
case 8: menu_mymenu2(id);
}
return PLUGIN_HANDLED;
}
public menu_mymenu2( id ) {
new szMenu[512], iLen;
new iKeys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<8)|(1<<9);
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU2_TITLE );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU2_1 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU2_2 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU2_3 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU2_4 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU2_5 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU2_6 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU2_7 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU2_8 );
iLen += format( szMenu[iLen], 512 - iLen, MENU_MYMENU2_NEXT );
iLen += format( szMenu[iLen], 512 - iLen, MENU_PREVIOUS );
show_menu( id, iKeys, szMenu );
return PLUGIN_HANDLED;
}
public _menu_mymenu2( id, iKey ) {
switch ( iKey )
{
case 0: jobchange(id,"Bellboy", "6");
case 1: jobchange(id,"Secretary", "8");
case 2: jobchange(id,"Nurse", "7");
case 3: jobchange(id,"Altar", "4");
case 4: jobchange(id,"Taxidriver", "5");
case 5: menu_mymenu2(id);
case 6: menu_mymenu2(id);
case 7: menu_mymenu2(id);
case 8: menu_mymenu2(id);
case 9: menu_mymenu(id);
}
return PLUGIN_HANDLED;
}