12.06.2012, 11:39
Here's my main callback
Now, How and Where do I put this rankings
So that when a player connects, this message sends to all
**Don't mind the other params, only the ranking string is my problem
PHP код:
public OnPlayerConnect(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i)&& playerid != i)
{
new name[MAX_PLAYER_NAME], country[MAX_COUNTRY_NAME], gmt;
new str2[256];
GetPlayerName(playerid, name, sizeof(name));
country = GetPlayerCountryName(playerid);
gmt = GetPlayerGMT(playerid);
format(str2, sizeof(str2), "* %s %s(%d) has connected to the server from %s (GMT %d:00)",rankings,name,playerid, country, gmt);//Focus on the rankings only
SendClientMessageToAll(concolor,str2);
return 1;
}
PHP код:
if(GetPlayerScore(playerid) > 0 && GetPlayerScore(playerid) < 10))
{
SCM(playerid, concolor, "Newbie");
}
else if(GetPlayerScore(playerid) > 10 && GetPlayerScore(playerid) < 50)
{
SCM(playerid, concolor, "Trucker");
}
else if(GetPlayerScore(playerid) > 50 && GetPlayerScore(playerid) < 100)
{
SCM(playerid, concolor, "Experienced Trucker");
}
else if(GetPlayerScore(playerid) > 100 && GetPlayerScore(playerid) < 300)
{
SCM(playerid, concolor, "Elite");
}
else if(GetPlayerScore(playerid) >= 300)
{
SCM(playerid, concolor, "Captain");
}
PHP код:
* Newbie John(0) has connected to the server from ----- (GMT --:--)


