02.05.2010, 18:42
Hey all, So. as the title reads, i am new to pawn scripting for SA:MP and need a lil help. I am trying to make a script to be able to make a menu called "teleports", and have 2 or more items inside the menu. (1 to cars, and 1 to boats). I finished writing the script, tried to compile it, and the program froze. I dont know if it has anything to do with my code, or my computer. plz help, il pst my code below.
Any help will be appreciated, much thanks.
Код:
new Menu:teleportmenu; teleportmenu = CreateMenu("Teleportmenu", 2, 200.0, 100.0, 150.0, 150.0); AddMenuItem(teleportmenu, 0, "Cars"); AddMenuItem(teleportmenu, 0, "Boats"); new Menu:CurrentMenu = GetPlayerMenu(playerid); if (CurrentMenu == teleportmenu) { switch(row) { case 0: //Cars { SetPlayerPos(playerid, 2008.595, -2382.287, 13.3382); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Car Lot"); } case 1: //Boats { SetPlayerPos(playerid, 467.115, -2534.099, 13.3382); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Boat lot" } } } if(strcmp(cmdtext, "/teleport", true) == 0) { ShowMenuForPlayer(teleportmenu,playerid); return 1; }