ZCMD - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ZCMD (
/showthread.php?tid=354767)
ZCMD -
AstonDA-G - 27.06.2012
pawn Код:
CMD:stats(playerid, params[])
{
new str[128], Name[MAX_PLAYER_NAME], Donator[3];
if(PlayerInfo[playerid][pDonator] == 1) format(Donator, sizeof Donator, "Yes");
if(PlayerInfo[playerid][pDonator] == 0) format(Donator, sizeof Donator, "No");
GetPlayerName(playerid, Name, sizeof(Name));
new Float:ratio = PlayerInfo[playerid][pKills]/PlayerInfo[playerid][pDeaths];
format(str, sizeof str, "%s stats: Kills: %i Deaths: %i K/D Ratio: %i Admin Level: %i Donator: %s", Name,PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],ratio,PlayerInfo[playerid][pAdmin],Donator);
SendClientMessage(playerid, COLOR_LIGHTRED, str);
return 1;
}
Hi.
I made this code for my friend, for a server he is making. It shows no errors in Pawno, but ingame it says Unknown Command when you try to use it. Also, the K/D ratio doesnt seem to work, and I dont know why. I also tried with floatdiv, and that didnt make any difference.
What have I done wrong?
thanks,
-Aston.
Re: ZCMD -
Steven82 - 27.06.2012
Are all his commands scripted using ZCMD, or are they a mixture of ZCMD and STRCMP?
Re: ZCMD -
ViniBorn - 27.06.2012
Replace
With