hello all azt szeretném megkérdezni h ennek a /stats parancsnak mi a bjaja beirom h /Stats és csak ugy lehet megnézni a saját adataim h ha au id-m is beirom valaki help
Parancs:
[pawn]CMD:stats(playerid,params[])
{
if(!strlen(params)) return SendClientMessage(playerid,red,\"Használat: /stats [playerid]\");
new player1, string[1000];
player1 = strval(params);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
new Float:player1health,Float:player1armour,ora,perc,mp,FavSkinID,GangStatus[64],P1Jailed[4],P1Frozen[4],P1GOD[12],P1FavPlace[10],P1InAFK[12];
GetPlayerHealth(player1,player1health);
GetPlayerArmour(player1,player1armour);
ora = dUserINT(PlayerName2(player1)).(\"hours\");
perc = dUserINT(PlayerName2(player1)).(\"minutes\");
mp = dUserINT(PlayerName2(player1)).(\"seconds\");
FavSkinID = dUserINT(PlayerName2(playerid)).(\"skin\");
if(dUserINT(PlayerName2(player1)).(\"FavPlace\") == 1)
{
PlayerInfo[player1][FavPlace]=1;
}
else
{
PlayerInfo[player1][FavPlace]=0;
}
if((PlayerInfo[player1][Gang]) > 0)
{
switch(PlayerInfo[player1][Gang])
{
case 1:
{
GangStatus = \"Nincs\";
}
case 2:
{
GangStatus = \"Grove\";
}
case 3:
{
GangStatus = \"Aztecas\";
}
case 4:
{
GangStatus = \"Seville\";
}
}
}
if(PlayerInfo[player1][Jailed] == 1) P1Jailed = \"Van\"; else P1Jailed = \"Nem\";
if(PlayerInfo[player1][Frozen] == 1) P1Frozen = \"Van\"; else P1Frozen = \"Nem\";
if(PlayerInfo[player1][FavPlace] == 1) P1FavPlace =\"Van\"; else P1FavPlace = \"Nincs\";
if(PlayerInfo[playerid][God] == 1) P1GOD = \"Bekapcsólva\"; else P1GOD = \"Kikapcsólva\";
if(PlayerInfo[player1][inAFK] == 1) P1InAFK =\"Bekapcsólva\"; else P1InAFK = \"Kikapcsólva\";
new Dstring[1000];
format(string, sizeof(string),\"{00BFFF}---====> Név: {FF0000}%s(%d){00BFFF}<====---\",PlayerName2(player1), player1);
format(Dstring, sizeof(Dstring),\"%s\",string);
format(string, sizeof(string),\"{00BFFF}Adminszint: {FF0000}%d{00BFFF} Warnok: {FF0000}%d{00BFFF} Kedvenc Skin: {FF0000}%d{00BFFF}\", PlayerInfo[player1][Level], PlayerInfo[player1][Warnings],FavSkinID);
format(Dstring, sizeof(Dstring),\"%s\\n%s\",Dstring,string);
format(string, sizeof(string),\"{00BFFF}Életenergia: {FF0000}%d{00BFFF} Páncél: {FF0000}%d{00BFFF} KedvencSpawn: {FF0000}%s{00BFFF}\",floatround(player1health),floatround(player1armour),P1FavPlace);
format(Dstring, sizeof(Dstring),\"%s\\n%s\",Dstring,string);
format(string, sizeof(string),\"{00BFFF}Ölések: {FF0000}%d{00BFFF} Halálok: {FF0000}%d{00BFFF} Arány: {FF0000}%0.2f{00BFFF} Banda: {FF0000}%s{00BFFF}\",PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:PlayerInfo[player1][Deaths],GangStatus);
format(Dstring, sizeof(Dstring),\"%s\\n%s\",Dstring,string);
format(string, sizeof(string),\"{00BFFF}Pénze: {FF0000}%d{00BFFF} Pontja: {FF0000}%d{00BFFF} GOD: {FF0000}%s{00BFFF}\",GetPlayerMoney(player1),GetPlayerScore(player1), P1GOD);
format(Dstring, sizeof(Dstring),\"%s\\n%s\",Dstring,string);
format(string, sizeof(string),\"{00BFFF}Börtönözve: {FF0000}%s{00BFFF} Lefagyasztva: {FF0000}%s{00BFFF} Afk: {FF0000}%s{00BFFF}\",P1Jailed, P1Frozen, P1InAFK);
format(Dstring, sizeof(Dstring),\"%s\\n%s\",Dstring,string);
format(string, sizeof(string),\"{00BFFF}Szerveren töltött idõ: {FF0000}%d{00BFFF} óra {FF0000}%d{00BFFF} perc {FF0000}%d{00BFFF} másodperc \",ora, perc, mp);
format(Dstring, sizeof(Dstring),\"%s\\n%s\",Dstring,string);
ShowPlayerDialog(playerid,1236,DIALOG_STYLE_MSGBOX,\"{FF0000}ADATOK\",Dstring,\"OK\",\"\");
if(PlayerInfo[player1][Level] >= 1 || IsPlayerAdmin(player1))
{
format(string, sizeof(string),\"%s megnézte az adataidat!\",PlayerName2(playerid));
SendClientMessage(player1,red,string);
}
}
else return SendClientMessage(playerid,red,\"HIBA: Ilyen játékos nem létezik\");
return 1;
}[/pawn]