SA-MP Forums Archive
Reaction-Test Bug(rep++) - 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)
+--- Thread: Reaction-Test Bug(rep++) (/showthread.php?tid=327868)



Reaction-Test Bug(rep++) - Join7 - 22.03.2012

https://sampforum.blast.hk/showthread.php?tid=150274
I have a problem with this system. After some time, began a server SPAM.

Edit: I put it in Gamemode


Re: Reaction-Test Bug(rep++) - TheArcher - 22.03.2012

Should be something wrong in the code. Try to ask the the original topic and Ryder will answer.


Re: Reaction-Test Bug(rep++) - Join7 - 31.03.2012

I asked but nobody replied. Is not that I put it in my Gamemode


Re: Reaction-Test Bug(rep++) - Randyy - 31.03.2012

because im bored i got one for you here

PHP код:
new QuestionStarted
PHP код:
new RandomQuestionMoney
PHP код:
new MinQuestionMoney 100;
new 
MaxQuestionMoney 500;
forward SendQuestionForMoney(); 
PHP код:
SetTimer("SendQuestionForMoney"900000true); 
PHP код:
public SendQuestionForMoney()
{
    new 
string[128];
    new 
qstring[32];
    
RandomQuestionMoney MinQuestionMoney+random(MaxQuestionMoney-MinQuestionMoney);
    
format(qstringsizeof(qstring), "%d%d%d%d%d%d%d%d"random(9), random(9), random(9), random(9), random(9), random(9), random(9), random(9));
    
strmid(Questionqstringfalsestrlen(qstring), 32);
    
format(stringsizeof(string), "** First one to type %s will earn $%d,-!"qstringRandomQuestionMoney);
    
SendClientMessageToAll(COLOR_ORANGEstring);
    
QuestionStarted 1;
    return 
1;

PHP код:
public OnPlayerText(playeridtext[])
{
    new    
string128 ]
    ;
    if(
QuestionStarted == && strfind(text[0], Questionfalse) == 0)
    {
         
format(stringsizeof(string), "$$$ %s has answered the question the fastest, he won: $%d,-, 1 exp and 1 gram of drugs $$$"PlayerName[playerid], RandomQuestionMoneyQuestion);
        
SendClientMessageToAll(COLOR_GREENstring);
        
GivePlayerMoney(playeridRandomQuestionMoney);
        
PlayerInfo[playerid][pDrugs] ++;
         
PlayerInfo[playerid][pExp] ++;
         
QuestionStarted 0;
         return 
0;
    }
    return 
1;


PHP код:
CMD:question(playeridparams[])
    {
        if(
PlayerInfo[playerid][pAdmin] >= 1337 || IsPlayerAdmin(playerid))
        {
            
SendQuestionForMoney();
            return 
1;
          }
          else
          {
              
SendClientMessage(playeridCOLOR_GREY"You are not allowed to use this command.");
          }
        return 
1;
    } 
Reputation is welcome ! XD


Re: Reaction-Test Bug(rep++) - Join7 - 11.04.2012

I fixed, бut I will give you rep