[Rep+Sex Appeal]Choose Items - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Rep+Sex Appeal]Choose Items (
/showthread.php?tid=566134)
[Rep+Sex Appeal]Choose Items -
cnoopers - 03.03.2015
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?
Re: [Rep+Sex Appeal]Choose Items -
ikey07 - 03.03.2015
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?
Re: [Rep+Sex Appeal]Choose Items -
cnoopers - 03.03.2015
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
Re: [Rep+Sex Appeal]Choose Items -
maramizo - 03.03.2015
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.
Re: [Rep+Sex Appeal]Choose Items -
cnoopers - 03.03.2015
little mistake about that colors. case is calling correctly, works showmenu and destroyveh.
table
car has got a valid modelids.
Re: [Rep+Sex Appeal]Choose Items -
cnoopers - 04.03.2015
buump! :]