Score Check error
#1

Hi, I was trying to make a little system, that when a player connects, the server checks its score so I can add name tags based on their score, Ex: I join the server and my score is 125, that means u r level 2 in my server, so in front of their name; there must stand not just their name. ex: Teletubbie but there should stand: [L2]Teletubbie.

However I have some errors, scripting the score check system, please help me out!

Code:
public score_check(playerid)
{

	if(GetPlayerScore(playerid) == <120)
	    {
	    
	    new name[MAX_PLAYER_NAME], string[44];
    	GetPlayerName(playerid, name, sizeof(name));
    	format(string, sizeof(string), "%[L1]s",name);
		SetPlayerName(playerid, string);
		}
		
		
    if(GetPlayerScore(playerid) == <180)
	    {

	    new name[MAX_PLAYER_NAME], string[44];
    	GetPlayerName(playerid, name, sizeof(name));
    	format(string, sizeof(string), "%[L2]s",name);
		SetPlayerName(playerid, string);
		}
		
    if(GetPlayerScore(playerid) == >180)
	    {

	    new name[MAX_PLAYER_NAME], string[44];
    	GetPlayerName(playerid, name, sizeof(name));
    	format(string, sizeof(string), "%[L3]s",name);
		SetPlayerName(playerid, string);
		}
}
NOTE: I didn't show all the timer function and its forwards, because i have no errors about the timer.
Reply
#2

Code:
if(GetPlayerScore(playerid) > 120 && GetPlayerScore(playerid) < 180) //Above 120 & below 180
{
    new name[MAX_PLAYER_NAME], string[44];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "[L1]%s",name);
    SetPlayerName(playerid, string);
}
Quick and simple! The rest should be piece of cake..
Reply
#3

THanks alot!
: D
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)