18.08.2009, 00:55
I need help with my menu, I always suck at making menus and i tryed looking at a tutorial...and it still messed up.
Heres my menu so far...
Top of my script:
OnGameModeInit:
OnPlayerSelectedMenuRow:
OnPlayerEnterStreamedCheckPoint:
Thats it, The problem i'm having is though, when i go in game, and select any item like say "TEC9" it still gives me a desert eagle...same goes with any other weapon it only gives me desert eagles
Whats wrong? thanks
Heres my menu so far...
Top of my script:
Код:
new Menu:ArmyWeps;
Код:
ArmyWeps = CreateMenu("Army Weapons", 2, 200.0, 100.0, 150.0, 150.0); AddMenuItem(ArmyWeps, 0, "MP5"); AddMenuItem(ArmyWeps, 0, "M4"); AddMenuItem(ArmyWeps, 0, "Sniper"); AddMenuItem(ArmyWeps, 0, "Sawnoff"); AddMenuItem(ArmyWeps, 0, "Tec9"); AddMenuItem(ArmyWeps, 0, "Desert Eagle");
Код:
public OnPlayerSelectedMenuRow(playerid, row) { GetPlayerMenu(playerid); { GivePlayerWeapon(playerid,29, 500); GivePlayerWeapon(playerid,31, 500); GivePlayerWeapon(playerid,34, 500); GivePlayerWeapon(playerid,26, 500); GivePlayerWeapon(playerid,32, 500); GivePlayerWeapon(playerid,24, 500); } return 1; }
Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid) { if(streamid == cp1) // army checkpoint { ShowMenuForPlayer(ArmyWeps, playerid); } return 1; }
Whats wrong? thanks