help me, onplayerupdate
#1

Quote:

if(GetPlayerScore(playerid) ==1000)
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a General of the Army", Pname);
SendClientMessageToAll(COLOR_RED,str);
return 1;
}
else if(GetPlayerScore(playerid) ==500)//level 12
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a General", Pname);
SendClientMessageToAll(COLOR_DARKRED,str);
return 1;
}
if(GetPlayerScore(playerid) ==300)//level 11
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a Major General", Pname);
SendClientMessageToAll(COLOR_DARKRED,str);
return 1;
}
else if(GetPlayerScore(playerid) ==250)//level 9
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a Lieutenant General", Pname);
SendClientMessageToAll(COLOR_DARKRED,str);
return 1;
}
if(GetPlayerScore(playerid) ==190)//level 8
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a Lieutenant Colonel", Pname);
SendClientMessageToAll(COLOR_RED,str);
return 1;
}
else if(GetPlayerScore(playerid) ==150)//level 7
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a Colonel", Pname);
SendClientMessageToAll(COLOR_RED,str);
return 1;
}
if(GetPlayerScore(playerid) ==110)//level 6
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a Major", Pname);
SendClientMessageToAll(COLOR_RED,str);
return 1;
}
else if(GetPlayerScore(playerid) ==80)//level 5
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a Captain", Pname);
SendClientMessageToAll(COLOR_RED,str);
return 1;
}
if(GetPlayerScore(playerid) ==65)//level 4
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a Lieutenant", Pname);
SendClientMessageToAll(COLOR_RED,str);
return 1;
}
else if(GetPlayerScore(playerid) ==45)//level 3
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a Sergeant", Pname);
SendClientMessageToAll(COLOR_RED,str);
return 1;
}
if(GetPlayerScore(playerid) ==25)// level 2
{
new str[128], Pname[24];
GetPlayerName(playerid, Pname, 24);
format(str, sizeof(str), "News: %s Has been promoted to a Corporal", Pname);
SendClientMessageToAll(COLOR_RED,str);
return 1;
}

i put that in onplayerupdate,

when i got 25 score
it always sendclientmessae over and over,,like spam

how to make it just once message send, if player get score

help me pls
Reply


Messages In This Thread
help me, onplayerupdate - by handerson - 23.06.2011, 09:34
Re: help me, onplayerupdate - by linuxthefish - 23.06.2011, 09:39
Re: help me, onplayerupdate - by TouR - 23.06.2011, 09:40
Re: help me, onplayerupdate - by handerson - 23.06.2011, 09:47
Re: help me, onplayerupdate - by Basicz - 23.06.2011, 09:53
Re: help me, onplayerupdate - by TouR - 23.06.2011, 12:02
Re: help me, onplayerupdate - by Sasino97 - 23.06.2011, 12:05
Re: help me, onplayerupdate - by shitbird - 23.06.2011, 14:59
Re: help me, onplayerupdate - by TouR - 24.06.2011, 10:41

Forum Jump:


Users browsing this thread: 1 Guest(s)