08.06.2013, 10:10
It's not that hard. Just keep track of their last selected classid. If the current classid is higher than the previous one they clicked forward, if it's lower they clicked backward. Of course you would need to take into account that it also wraps around. So if you have classid 299 and the next one is 1 then the player pressed forward but the thing wrapped around.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
static
lastClass[MAX_PLAYERS];
if(classid > lastClass[playerid])
{
// press forward
}
else if(classid < lastClass[playerid])
{
// press backward
}
lastClass[playerid] = classid;
return 1;
}