SA-MP Forums Archive
FORCING PLAYER TO READ RULES AND GAMEPOINT!! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: FORCING PLAYER TO READ RULES AND GAMEPOINT!! (/showthread.php?tid=93514)



FORCING PLAYER TO READ RULES AND GAMEPOINT!! - will_92 - 25.08.2009

on valhallla i don't know how they do it , but when you come in i don't know if they put it under onplayerconnect but when you come in and spawn it shows you a tutorial on how to play the game forcefully by making a toggle , and so i don't know if anyone has a script that can show me how to do the tutorial thingy. please help me with this


Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - Eazy_Efolife - 25.08.2009

Quote:
Originally Posted by will_92
on valhallla i don't know how they do it , but when you come in i don't know if they put it under onplayerconnect but when you come in and spawn it shows you a tutorial on how to play the game forcefully by making a toggle , and so i don't know if anyone has a script that can show me how to do the tutorial thingy. please help me with this
I have it on mine, but I dont wanna show!

But on there register files, When you register, your stat "tutorial" is gonna be 0! So when you spawn you will be forced to take it! When your done your tutorial, stat will turn to 1, and you wont take it anymore!

To do this its all about Starting a Timer when you register, that will make you start a tutorial useing SendClientMessage! You Dont need the tutorial stat though! I use it when people to /register and registers successfully to make then view a tutorial. If you want I can make one for you! Free of Cost




Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - SpiderPork - 25.08.2009

There's a tutorial in The Godfather, take a look through it, though I suggest you make your own.


Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - will_92 - 25.08.2009

I know , but i want to see , how to do it , and i don't think the Gotfather has one i checked


Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - Eazy_Efolife - 25.08.2009

Val Halla is a GF edit.... So GF does have it


Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - Kieren - 25.08.2009

Have a look through the GF source and you'll see how it's done, then you'll have an idea how you can create yours. I wouldn't recommended copying it though...


Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - snoob - 25.08.2009

hi
i have no clue what it look like on the server your speaking of

try this little filterscript its a way to do it... maybe this will help you understand how to do it.
pawn Код:
#include <a_samp>

#define RULE_LINE_0 "bla bla bla"
#define RULE_LINE_1 "Some more blabla"
#define RULE_LINE_2 "now some info"
#define RULE_LINE_3 "~y~TYPE ~>~~r~I UNDERSTAND~<~ ~y~to be aible to spawn"

new PlayerMustReadRule[MAX_PLAYERS];
new Text:TxtRules;

public OnFilterScriptInit()
{
    print("===> read the rules");

    new TmpString[200];// make sure you have enought room to store all the character of every RULE_LINE

    format(TmpString,sizeof(TmpString),"%s~n~%s~n~%s~n~%s~n~",
      RULE_LINE_0, RULE_LINE_1, RULE_LINE_2, RULE_LINE_3);
      //we format our rules text
     
    TxtRules = TextDrawCreate(225.0, 35.0,TmpString); //we create our rules text
    TextDrawFont(TxtRules,1);
    TextDrawLetterSize(TxtRules,0.26,1.08);
    TextDrawColor(TxtRules,0xD7D7D799); //
    TextDrawSetShadow(TxtRules,0);
    TextDrawSetOutline(TxtRules,1);
    TextDrawBackgroundColor(TxtRules,0x00000099);
    TextDrawUseBox(TxtRules,0);

    return 1;
}

public OnFilterScriptExit()
{
    TextDrawDestroy(TxtRules); // when the script unload we destroy the text
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
  if(PlayerMustReadRule[playerid]) //if the player must read ...
  {
    TextDrawShowForPlayer(playerid,TxtRules);//we show him the text
  }
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
  if(PlayerMustReadRule[playerid]) return 0; //the player must read the rule and cant spawn
    return 1;
}

public OnPlayerConnect(playerid)
{
  PlayerMustReadRule[playerid] = 1; //the player is freshly connected he need to read the rules
    return 1;
}

public OnPlayerText(playerid, text[])
{
    if (strcmp("I UNDERSTAND", text, true, 12) == 0)
    {
        TextDrawHideForPlayer(playerid, TxtRules);// we hide our text
        PlayerMustReadRule[playerid] = 0; //set the player so he can spawn
        return 0;
    }
    return 1;
}
see ya

Edit: its also on pastebin... http://pawno.pastebin.com/d19cc7063