Auto Messages to a certian score - 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: Auto Messages to a certian score (
/showthread.php?tid=139720)
Auto Messages to a certian score -
xLowrider - 06.04.2010
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?
Re: Auto Messages to a certian score -
-Rebel Son- - 06.04.2010
I think you can take a normal auto message script, and possibly add.. if(GetPlayerscore < 5)
i think thats how it is spelt.
Re: Auto Messages to a certian score -
xLowrider - 06.04.2010
Anyone else?
Re: Auto Messages to a certian score -
Hiddos - 06.04.2010
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;
}