10.07.2010, 18:39
I have made 0 gamemode but my problem is how to ubacam / stats command to show me my score points and money you have in me.
new string[106];
format(string, sizeof(string), "Score : %d Money : %d", GetPlayerScore(playerid), GetPlayerMoney(playerid));
SendClientMessage(playerid, Colour, string);
new playername[MAX_PLAYER_NAME];
if(strcmp(cmd, "/stats", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, 0xFFFFFFF,"___________________________________________");
format(string, sizeof(string),"Money: %d", GetPlayerMoney(playerid));
SendClientMessage(playerid,0xFFFFFFFF,string);
format(string, sizeof(string),"Score: %d", GetPlayerScore(playerid));
SendClientMessage(playerid, 0xFFFFFFF,"___________________________________________");
}
return 1;
}
if(strcmp(cmd, "/stats", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, 0xFFFFFFF,"___________________________________________");
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string),"Name: %s", playername);
SendClientMessage(playerid,0xFFFFFFFF,string);
format(string, sizeof(string),"Money: %d", GetPlayerMoney(playerid));
SendClientMessage(playerid,0xFFFFFFFF,string);
format(string, sizeof(string),"Score: %d", GetPlayerScore(playerid));
SendClientMessage(playerid, 0xFFFFFFF,"___________________________________________");
}
return 1;
}