07.07.2013, 14:15
Quote:
Add this to your command.
pawn Код:
pawn Код:
pawn Код:
|
PHP код:
dcmd_getstats(playerid,params[])
{
new ID;
new Float:gihp, Float:giar;
GetPlayerHealth(ID, gihp);
GetPlayerArmour(ID, giar);
GetPlayerWantedLevel(ID);
new temp[1000];
new info[1000];
if(sscanf(params, "u", ID))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /tinfo (Player Name/ID)");
return 1;
}
if(IsSpawned[playerid] != 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command.");
return 1;
}
format(temp, sizeof(temp), "Name: %s(%d)\n",PlayerName(ID),ID);
strcat(info, temp);
format(temp, sizeof(temp), "Score: %i\n",GetPlayerScore(ID));
strcat(info, temp);
format(temp, sizeof(temp), "Cash: %d$\n",GetPlayerMoney(ID));
strcat(info, temp);
format(temp, sizeof(temp), "Bank Cash: %d$\n",BankCash[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Admin Level: %d\n",AdminLevel[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Army: %d\n",CanUseArmy[ID]);
strcat(info, temp);
new variable[4];
if(CanUseCIA[playerid] == 1337) format(variable, sizeof(variable), "Yes");
else format(variable, sizeof(variable), "No");
return variable;
format(temp, sizeof(temp), "CIA: %d\n",variable);
strcat(info, temp);
format(temp, sizeof(temp), "Regular Player: %d\n",IsRegularPlayer[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Trusted Regular Player: %d\n",IsTRP[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Warns: %d\n",Warns[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Terrorist Skill: %d\n",TerroristSkill[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Rob Skill: %d\n",RobSkill[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Cop Rank: %d\n",CopRank[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Has C4: %d\n",HasC4[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Secure Wallet: %d\n",HasSecureWallet[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Condoms: %d\n",HasCondoms[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Ropes: %d\n",HasRope[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Scissors: %d\n",HasScissors[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Kills: %d\n",Kills[ID]);
strcat(info, temp);
format(temp, sizeof(temp), "Deaths: %d\n",Deaths[ID]);
strcat(info, temp);
ShowPlayerDialog(playerid,DIALOG_STATS, DIALOG_STYLE_MSGBOX,"{53C506}Stats",info,"Close","");
return true;
}
PHP код:
D:\Games\SFCRRPGv1.1\Best\gamemodes\SFCRRPG.pwn(4424) : error 033: array must be indexed (variable "dcmd_tinfo")
D:\Games\SFCRRPGv1.1\Best\gamemodes\SFCRRPG.pwn(5716) : error 079: inconsistent return types (array & non-array)
D:\Games\SFCRRPGv1.1\Best\gamemodes\SFCRRPG.pwn(5721) : error 079: inconsistent return types (array & non-array)
D:\Games\SFCRRPGv1.1\Best\gamemodes\SFCRRPG.pwn(5746) : warning 225: unreachable code
D:\Games\SFCRRPGv1.1\Best\gamemodes\SFCRRPG.pwn(5789) : error 079: inconsistent return types (array & non-array)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.