Quote:
Originally Posted by Wasim_Cortez
Put this under the "Forward"'s you have in your script.
pawn Код:
forward ShowStats(playerid,targetid);
Put this under "Onplayercommandtext"
pawn Код:
//______________________________________________________________________________ // /Stats if (strcmp(cmd, "/stats", true) == 0) { if(IsPlayerConnected(playerid)) { if (gPlayerLogged[playerid] != 0) { ShowStats(playerid,playerid); } else { SendClientMessage(playerid, COLOR_GRAD1, "[STATS] You need to Login to use this Command."); } } return 1; }
Then put this anywhere in your gamemode, I have it near the bottem.
pawn Код:
public ShowStats(playerid,targetid) { if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid)) { new Cash = GetPlayerMoney(targetid); new Deaths = PlayerInfo[targetid][pDeaths]; new Kills = PlayerInfo[targetid][pKills]; new pName[MAX_PLAYER_NAME]; new ptime = PlayerInfo[targetid][pConnectTime]; GetPlayerName(targetid, pName, sizeof(pName)); new Float:pX,Float:pY,Float:pZ; GetPlayerPos(targetid, pX,pY,pZ); new CoordString[256]; SendClientMessage(playerid, COLOR_GREEN,"________________________________________________________________"); // In here add the stats you want to show!! SendClientMessage(playerid, COLOR_GREEN,"________________________________________________________________"); } }
There you go, Just remember to add the stats you want where it says it in the script...
|
How do i add then..
// In here add the stats you want to show!! <--- Don't now how to add..
Just SendClientMessage(playerid, COLOR_WHITE, cash);?