Previous button In OnPlayerRequestClass
#1

Hello, їhow to detect when I give push to the button back OnPlayerRequestClass

pawn Код:
new count[MAX_PLAYERS];
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(count[playerid])
    {
        case 0: {SendClientMessage(playerid, -1, "1"); count[playerid]++;}
           case 1: {SendClientMessage(playerid, -1, "2");}
    }
    return 1;
}
I want to press the button backward, you subtract the count variable.



pawn Код:
count[playerid]--;
їHow to make?
Reply
#2

Store the classid in a global array. If it's less than the previous class they pressed <<, else if it is higher then pressed >>.
Reply
#3

Tankz Man.

EDIT: Resolved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)