Dealying...Player request class or smthn?
#1

Hi all, Hows you all? I m having a prob...not actually a prob just clueless on how to do it..

okey so Yesterday i asked one question about textdraw..That when a player join he should see a textdraw Of rules and it should go for upto 5 seconds..and then the dialog box should be there.. its working fine...thanks to CalvinC and ZombieNet ..

but now for the current thing..when the rules textdraw shows up... i dont want players to see the 'class selection screen' like whether they spawn as civilian or smthn..but till the rules Are there.. they should see the sky background itself which is at start of SA:MP Client...and then after textdraw it shows login dialog and class selection screen? how do i delay showing the class selection screen? do i use the same timer...what i do lol? m clueless..

thanks in advance btw.
Reply
#2

Use https://sampwiki.blast.hk/wiki/TogglePlayerSpectating to make them spectate nothing, this will bring up the sky, as you say. When the textdraw disappears, just toggle it back to 0 and RequestClass should be called, i think.
Reply
#3

How to toggle it back to 0? as soon as textdraw end...? u mean under on playerconnect before the timer and textdraw i should make them spectate and in the timer function.. when i hide the textdraw i should make there spectation false(0) ?
Reply
#4

pawn Код:
public OnPlayerConnect(playerid)
{
     //the rules

     SetTimerEx("HideRules", 5000, false, "d", playerid);

     TogglePlayerSpectating(playerid, true);
     return 1;
}

forward HideRules(playerid);
public HideRules(playerid)
{
     //hide the rules

     TogglePlayerSpectating(playerid, false);

     CallLocalFunction("OnPlayerRequestClass", "dd", playerid, 0);

     return 1;
}
Reply
#5

Worked!! +Rep n thanks <333
Reply
#6

Yes, that's what I mean.
Reply
#7

Sorry for double posting..thanks to both actually...just saw gingers..post )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)