PLEASE HELP?
#1

Please help. I have these lines under:

Callback:
Код:
public OnPlayerRequestClass(playerid, classid)
This is what i have:
Код:
if(classid == 0)
{
       GameTextForPlayer(playerid, "~r~ Area 69!", 3000, 1);
}

if(classid == 1)
{
       GameTextForPlayer(playerid, "~r~ Abandoned airport!", 3000, 1);
}
When i click the one with area 60 it works fine and spawns me there. That is not my problem but my problem is: When i switch between class 1 and class 2 the text stays the same unless you wait for it to go. For example:

"Im on class 1. It says Area 69. i switch to Class 2 and it still says area 69. I switch back to Class 1 and it still says area 69. I wait 10-20 secs and area 69 dissappears. I then switch to Class 2 and it says Abandoned airport" How can i make it so when i switch between classes it swaps the GameTextForPlayer Instantly?
Reply
#2

BUMP!!! Please help me? :/
Reply
#3

i think i got it
pawn Код:
if(classid == 0)
       {
       GameTextForPlayer(playerid, "~r~ Area 69!", 3000, 1);
       }

else if(classid == 1)
       {
       GameTextForPlayer(playerid, "~r~ Abandoned airport!", 3000, 1);
       }
       return 1;
}
Reply
#4

Quote:
Originally Posted by fangoth1
Посмотреть сообщение
i think i got it
pawn Код:
if(classid == 0)
{
       GameTextForPlayer(playerid, "~r~ Area 69!", 3000, 1);
}

else if(classid == 1)
{
       GameTextForPlayer(playerid, "~r~ Abandoned airport!", 3000, 1);
}
       return 1;
}
Already tried that. It doesn't work.
Reply
#5

hmm, i wonder
Reply
#6

Sometimes many if symbols gives me errors '-'


When it happens, i use one if in the begining and else if after, try this:


pawn Код:
if(classid == 0)
    {
        GameTextForPlayer(playerid, "~r~ Area 69!", 3000, 1);
    }
    else if(classid == 1)
    {
        GameTextForPlayer(playerid, "~r~ Abandoned airport!", 3000, 1);
    }

I hope i have helped
Reply
#7

did you define the Class id there on?
Reply
#8

Like i said, i have tried that and it doesn't work and it is not errors i get. Read the post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)