[Rep+Sex Appeal]Choose Items
#1

hi
i've got table blabla[MAX_PLAYERS][10]; and i'd like to make sth like 'menu'. in keystatechange after press some key we can go to the next item (from 0 to 9) and another else key - we can back from that item where we are.
How to make it?
Reply
#2

pawn Код:
new CurrentState[MAX_PLAYERS];
OnPlayerKeyStateChange(playerid...
{
if(newkey == YOUR Key)
{

CurrentState[playerid]++;
if(CurrentState[playerid] > 9) { CurrentState[playerid] = 0; }
blabla[playerid][CurrentState[playerid]]
}
}
Smt like this?
Reply
#3

yeeeeah but veh is not creating.
Код:
	        case 0:{
	            ShowMenuForPlayer(MENU_Garage[1], playerid);
				DestroyVehicle(playercar[playerid]);
				
				CurrentState[playerid]++;
				if(CurrentState[playerid] > 9) { CurrentState[playerid] = 0; }
				playercar[playerid] = CreateVehicle(car[playerid][CurrentState[playerid]], -1638.0994, 1296.7168, 6.6448, 134.1071, -1, -1, 100);
				
	        }
anyway, rep is gone to you
Reply
#4

Does the menu show normally? Are you sure that case is getting called?
And why are you creating a vehicle with colors of '-1'? Those are invalid color codes.

For valid ones, click me.
Reply
#5

little mistake about that colors. case is calling correctly, works showmenu and destroyveh.
table car has got a valid modelids.
Reply
#6

buump! :]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)