20.08.2011, 10:25
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!
NOTE: I didn't show all the timer function and its forwards, because i have no errors about the timer.
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); } }