Reaction-Test Bug(rep++)
#1

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
Reply
#2

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

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

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", 900000, true); 
PHP код:
public SendQuestionForMoney()
{
    new 
string[128];
    new 
qstring[32];
    
RandomQuestionMoney = MinQuestionMoney+random(MaxQuestionMoney-MinQuestionMoney);
    
format(qstring, sizeof(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(Question, qstring, false, strlen(qstring), 32);
    
format(string, sizeof(string), "** First one to type %s will earn $%d,-!", qstring, RandomQuestionMoney);
    
SendClientMessageToAll(COLOR_ORANGE, string);
    
QuestionStarted = 1;
    return 
1;
} 
PHP код:
public OnPlayerText(playerid, text[])
{
    new    
string[ 128 ]
    ;
    if(
QuestionStarted == 1 && strfind(text[0], Question, false) == 0)
    {
         
format(string, sizeof(string), "$$$ %s has answered the question the fastest, he won: $%d,-, 1 exp and 1 gram of drugs $$$", PlayerName[playerid], RandomQuestionMoney, Question);
        
SendClientMessageToAll(COLOR_GREEN, string);
        
GivePlayerMoney(playerid, RandomQuestionMoney);
        
PlayerInfo[playerid][pDrugs] ++;
         
PlayerInfo[playerid][pExp] ++;
         
QuestionStarted = 0;
         return 
0;
    }
    return 
1;
} 

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

I fixed, бut I will give you rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)