15.09.2012, 21:32
Код:
command(stats, playerid, params[]) { new string[128]; format(string, sizeof(string), "Player Stats: "); // depends what you want here, nick name? // Look at the message below, if you want a nick name, in the speech marks, set %u to find the nick name, and after the speech marks, set the enum and fields you want to get the data from. TextDrawShowForPlayer(playerid, STextdraw0); format(string, sizeof(string), "Score: %s", pInfo[playerid][pScore]); // looks for player's score... TextDrawShowForPlayer(playerid, STextdraw1); // this shows the textdraw using the string above format(string, sizeof(string), "Kills: %s", pInfo[playerid][pKills]); TextDrawShowForPlayer(playerid, STextdraw2); format(string, sizeof(string), "Deaths: %s", pInfo[playerid][pScore]); TextDrawShowForPlayer(playerid, STextdraw3); format(string, sizeof(string), "Robberies: %s", pInfo[playerid][pRobberies]); TextDrawShowForPlayer(playerid, STextdraw4); format(string, sizeof(string), "Arrests: %s", pInfo[playerid][pArrests]); TextDrawShowForPlayer(playerid, STextdraw5); return 1; }
For this, you need to include ZCMD in your script:
https://sampforum.blast.hk/showthread.php?tid=91354