02.06.2014, 12:28
(
Последний раз редактировалось TazmaNiax; 02.06.2014 в 13:13.
)
- FIXED -
CMD:stats(playerid, params[]) { new str[956], yes[2][50]; if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, COLOR_RED, "[Error]: You must be logged in to use this command!"); GetPlayerIp(playerid, pInfo[playerid][Ip], 16); switch(pInfo[playerid][NoPM]) { case 0: yes[0] = "Disable"; case 1: yes[0] = "Enable"; } switch(pInfo[playerid][PlayerTele]) { case 0: yes[1] = "Disable"; case 1: yes[1] = "Enable"; } format(str, "{15D4ED}Player Name: %s\n", GetName(playerid)); // Error Started format(str, "Ip Address: %s\n", pInfo[playerid][Ip]); format(str, "Admin: %i\n", pInfo[playerid][Admin]); format(str, "VIP: %i\n", pInfo[playerid][VIP]); format(str, "Drugs: %i || Herione: %i || Cocaine: %i\n", pInfo[playerid][Drugs], pInfo[playerid][Heroine], pInfo[playerid][Cocaine]); format(str, "Money: $%i\n", GetPlayerMoney(playerid)); format(str, "Score: %i\n", GetPlayerScore(playerid)); format(str, "Cookies: %i\n", pInfo[playerid][Cookies]); format(str, "SkinID: %i\n", pInfo[playerid][SaveSkin]); format(str, "PM: %s\n", yes[0]); format(str, "Player Teleport: %s\n", yes[1]); format(str, "Bank Balance: $%i\n", pInfo[playerid][BankWealth]); format(str, "Kills: %i || Deaths: %i || Ratio: NaN\n", pInfo[playerid][Kills], pInfo[playerid][Deaths]); // End Of Error line ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, ""white"Stats", str, "Close", ""); SendAdminCMD(playerid, "stats"); return 1;
CMD:stats(playerid, params[]) { new str[956], yes[2][50]; if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, COLOR_RED, "[Error]: You must be logged in to use this command!"); GetPlayerIp(playerid, pInfo[playerid][Ip], 16); switch(pInfo[playerid][NoPM]) { case 0: yes[0] = "Disable"; case 1: yes[0] = "Enable"; } switch(pInfo[playerid][PlayerTele]) { case 0: yes[1] = "Disable"; case 1: yes[1] = "Enable"; } format(str,sizeof(str), "{15D4ED}Player Name: %s\nIp Address: %s\nAdmin: %i\nVIP: %i\nDrugs: %i || Herione: %i || Cocaine: %i\nMoney: $%i\nScore: %i\nCookies: %i\nSkinID: %i\nPM: %s\nPlayer Teleport: %s\nBank Balance: $%i\nKills: %i || Deaths: %i || Ratio: NaN\n", GetName(playerid),pInfo[playerid][Ip],pInfo[playerid][Admin],pInfo[playerid][VIP],pInfo[playerid][Drugs], pInfo[playerid][Heroine], pInfo[playerid][Cocaine],GetPlayerMoney(playerid),GetPlayerScore(playerid),pInfo[playerid][Cookies],pInfo[playerid][SaveSkin],yes[0],yes[1],pInfo[playerid][BankWealth],pInfo[playerid][Kills], pInfo[playerid][Deaths]); ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, ""white"Stats", str, "Close", ""); SendAdminCMD(playerid, "stats"); return 1;
CMD:stats(playerid, params[])
{
new str[956], yes[2][50];
if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, COLOR_RED, "[Error]: You must be logged in to use this command!");
GetPlayerIp(playerid, pInfo[playerid][Ip], 16);
switch(pInfo[playerid][NoPM])
{
case 0: yes[0] = "Disable";
case 1: yes[0] = "Enable";
}
switch(pInfo[playerid][PlayerTele])
{
case 0: yes[1] = "Disable";
case 1: yes[1] = "Enable";
}
strcat(str, "{15D4ED}Player Name: %s\n", GetName(playerid));
strcat(str, "Ip Address: %s\n", pInfo[playerid][Ip]);
strcat(str, "Admin: %i\n", pInfo[playerid][Admin]);
strcat(str, "VIP: %i\n", pInfo[playerid][VIP]);
strcat(str, "Drugs: %i || Herione: %i || Cocaine: %i\n", pInfo[playerid][Drugs], pInfo[playerid][Heroine], pInfo[playerid][Cocaine]);
strcat(str, "Money: $%i\n", GetPlayerMoney(playerid));
strcat(str, "Score: %i\n", GetPlayerScore(playerid));
strcat(str, "Cookies: %i\n", pInfo[playerid][Cookies]);
strcat(str, "SkinID: %i\n", pInfo[playerid][SaveSkin]);
strcat(str, "PM: %s\n", yes[0]);
strcat(str, "Player Teleport: %s\n", yes[1]);
strcat(str, "Bank Balance: $%i\n", pInfo[playerid][BankWealth]);
strcat(str, "Kills: %i || Deaths: %i || Ratio: NaN\n", pInfo[playerid][Kills], pInfo[playerid][Deaths]);
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, ""white"Stats", str, "Close", "");
SendAdminCMD(playerid, "stats");
return 1;
Try it; it may be bugged though, not tested...
pawn Код:
|
D:\xSF\gamemodes\IxF.pwn(19607) : error 035: argument type mismatch (argument 3) D:\xSF\gamemodes\IxF.pwn(19611) : warning 202: number of arguments does not match definition D:\xSF\gamemodes\IxF.pwn(19611) : warning 202: number of arguments does not match definition D:\xSF\gamemodes\IxF.pwn(19616) : error 035: argument type mismatch (argument 3) D:\xSF\gamemodes\IxF.pwn(19617) : error 035: argument type mismatch (argument 3) D:\xSF\gamemodes\IxF.pwn(19619) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
strcat(str, "{15D4ED}Player Name: %s\n", GetName(playerid)); // ERROR strcat(str, "Ip Address: %s\n", pInfo[playerid][Ip]); strcat(str, "Admin: %i\n", pInfo[playerid][Admin]); strcat(str, "VIP: %i\n", pInfo[playerid][VIP]); strcat(str, "Drugs: %i || Herione: %i || Cocaine: %i\n", pInfo[playerid][Drugs], pInfo[playerid][Heroine], pInfo[playerid][Cocaine]); // Error strcat(str, "Money: $%i\n", GetPlayerMoney(playerid)); strcat(str, "Score: %i\n", GetPlayerScore(playerid)); strcat(str, "Cookies: %i\n", pInfo[playerid][Cookies]); strcat(str, "SkinID: %i\n", pInfo[playerid][SaveSkin]); strcat(str, "PM: %s\n", yes[0]); strcat(str, "Player Teleport: %s\n", yes[1]); // Error strcat(str, "Bank Balance: $%i\n", pInfo[playerid][BankWealth]); strcat(str, "Kills: %i || Deaths: %i || Ratio: NaN\n", pInfo[playerid][Kills], pInfo[playerid][Deaths]); //Error ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, ""white"Stats", str, "Close", ""); SendAdminCMD(playerid, "stats");
CMD:stats(playerid, params[])
{
new str[200], yes[2][50],sho[956];
if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, COLOR_RED, "[Error]: You must be logged in to use this command!");
GetPlayerIp(playerid, pInfo[playerid][Ip], 16);
switch(pInfo[playerid][NoPM])
{
case 0: yes[0] = "Disable";
case 1: yes[0] = "Enable";
}
switch(pInfo[playerid][PlayerTele])
{
case 0: yes[1] = "Disable";
case 1: yes[1] = "Enable";
}
format(str,sizeof(str), "{15D4ED}Player Name: %s\n", GetName(playerid));
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "Ip Address: %s\n", pInfo[playerid][Ip]);
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "Admin: %i\n", pInfo[playerid][Admin]);
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "VIP: %i\n", pInfo[playerid][VIP]);
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "Drugs: %i || Herione: %i || Cocaine: %i\n", pInfo[playerid][Drugs], pInfo[playerid][Heroine], pInfo[playerid][Cocaine]);
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "Money: $%i\n", GetPlayerMoney(playerid));
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "Score: %i\n", GetPlayerScore(playerid));
strcat(sho,str,sizeof(sho));
format(str,sizeof(str),"Cookies: %i\n", pInfo[playerid][Cookies]);
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "SkinID: %i\n", pInfo[playerid][SaveSkin]);
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "PM: %s\n", yes[0]);
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "Player Teleport: %s\n", yes[1]);
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "Bank Balance: $%i\n", pInfo[playerid][BankWealth]);
strcat(sho,str,sizeof(sho));
format(str,sizeof(str), "Kills: %i || Deaths: %i || Ratio: NaN\n", pInfo[playerid][Kills], pInfo[playerid][Deaths]);
strcat(sho,str,sizeof(sho));
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, ""white"Stats", sho, "Close", "");
SendAdminCMD(playerid, "stats");
return 1;
}
Actually the code that Ben gave is wrong
this is correct one use this-- pawn Код:
|