Auto Messages to a certian score
#1

I'm looking to make auto messages script, which is fairly easy. But i want it to only play to if your score if 5 and under, Then it will do the automesasges to the level 5's and under but not to the level 5's plus. So level 20's won't see the automessages.
Anyway i can get it to read the score and only send it to the playeR?
Reply
#2

I think you can take a normal auto message script, and possibly add.. if(GetPlayerscore < 5)
i think thats how it is spelt.
Reply
#3

Anyone else?
Reply
#4

Didn't test this

pawn Code:
forward ScoreMessages();
new ScoreMSGTimer;

public OnGameModeInit()
{
   ScoreMSGTimer = SetTimer("ScoreMessages",30000,1);
   return 1;
}

public OnGameModeExit()
{
   KillTimer(ScoreMSGTimer);
   return 1;
}

public ScoreMessages()
{
  for(new i; i <= MAX_PLAYERS; i++)
  {
     if(GetPlayerScore(i) <= 5)
     {
       new string[128];
       format(string,sizeof(string),"Your score is: %d",GetPlayerScore(i));
       SendClientMessage(i,0xE2C063FF,string); //Color is just random, found it in rivershell script.
     }
   }
   return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)