01.04.2009, 20:06
It should read the values from a file then display some of the text on a /stats command.
There is no errors but in the game it will not display.
The file looks like this:
Instead it shows as "[STATS] Job Level: | Current Truck ID: | Jobs Finished: "
pawn Код:
if(strcmp(cmd, "/stats", true) == 0)
{
if(Logged[playerid] == 1)
{
new Stats[128];
TruckType[playerid] = dini_Int(udb_encode(PlayerName), "TruckType");
JobsDone[playerid] = dini_Int(udb_encode(PlayerName), "JobsDone");
JobLevel[playerid] = dini_Int(udb_encode(PlayerName), "JobLevel");
format(Stats, sizeof(Stats), "[STATS] Job Level: %s | Current Truck ID: %s | Jobs Finished: %s", JobLevel[playerid], TruckType[playerid], JobsDone[playerid]);
SendClientMessage(playerid, COLOUR_LIGHTBLUE, Stats);
}
else
{
SendClientMessage(playerid, COLOUR_RED, "Please First Login: /login [password]");
}
return 1;
}
There is no errors but in the game it will not display.
The file looks like this:
Код:
password=******* AdminLevel=5 Money=2500 TruckType=413 JobsDone=0 JobLevel=1 Skin=261