FORCING PLAYER TO READ RULES AND GAMEPOINT!!
#7

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
Reply


Messages In This Thread
FORCING PLAYER TO READ RULES AND GAMEPOINT!! - by will_92 - 25.08.2009, 15:31
Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - by Eazy_Efolife - 25.08.2009, 15:36
Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - by SpiderPork - 25.08.2009, 15:39
Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - by will_92 - 25.08.2009, 15:58
Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - by Eazy_Efolife - 25.08.2009, 16:45
Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - by Kieren - 25.08.2009, 16:51
Re: FORCING PLAYER TO READ RULES AND GAMEPOINT!! - by snoob - 25.08.2009, 16:54

Forum Jump:


Users browsing this thread: 1 Guest(s)