30.07.2012, 11:17
When i write /check on a player it shows nothing.. when i try /check me it shows my stats
Here is /check
And here is /stats
Here is /check
Код:
if (strcmp(cmd, "/check", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /check [playerid/PartOfName]"); return 1; } //giveplayerid = strval(tmp); giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { ShowStats(playerid,giveplayerid); } } else { SendClientMessage(playerid, COLOR_GRAD1, " No Such Player"); } } else { SendClientMessage(playerid, COLOR_GRAD1, " You are not an admin"); } } return 1; }
Код:
new coordsstring[512]; new bigstring[2048]; format(coordsstring, sizeof(coordsstring),"{FFFFFF}|______________________________________________| %s (%d) |__________________________________________________|\n",name, targetid); strcat(bigstring,coordsstring); format(coordsstring, sizeof(coordsstring),"{00C0FF}| Level: %d | Sex: %s | SpawnHealth: %.1f | Age: %d | Cash: $%d | Bank: $%d | Card: $%d |\n", level,atext,shealth+50,age,cash,account,card); strcat(bigstring,coordsstring); format(coordsstring, sizeof(coordsstring),"{C3C3C3}| TotalPlayingHours: %d | TimesArrested: %d | Respect: %d/%d |NextLevel: %d$ | Job: %s | LotoNr: %d | Rob: %d/20 \n",ptime,arrests,exp,expamount,costlevel,jtext,lotto,rob); strcat(bigstring,coordsstring); format(coordsstring, sizeof(coordsstring),"{00C0FF}| DonatorRank: %s | Int: %d | Local: %d | | WantedLeveL : %d |\n",drank,intir,local,wl); strcat(bigstring,coordsstring); format(coordsstring, sizeof(coordsstring),"{C3C3C3}| Organisation: %s | Rank: %s | Drugs: %d | Materials: %d |\n",ttext,rtext,drugs,mats); strcat(bigstring,coordsstring); format(coordsstring, sizeof(coordsstring),"{00C0FF}| PhoneNr: %d | Housekey: %d | HouseKey2: %d | BusinessKey: %d | HireKey: %d |\n",pnumber,housekey,housekey2,bizkey,HireCar[targetid]); strcat(bigstring,coordsstring); format(coordsstring, sizeof(coordsstring),"{C3C3C3}| AdminLeveL: %d | Warn: %d | FWarn: %d | AdmWarn: %d | \n",adminl,warns,fwarns,admwarn); strcat(bigstring,coordsstring); { if(PlayerInfo[playerid][pPcarkey] == 999 && PlayerInfo[playerid][pPcarkey2] == 999 && PlayerInfo[playerid][pPcarkey3] == 999) { strcat(bigstring,"{F81414}| *** Nu ai masinii ! ***\n"); strcat(bigstring,"{FFFFFF}|__________________________________________________________________________________________________________|"); //return 1; } else { if (PlayerInfo[playerid][pPcarkey] != 999) { format(coordsstring, sizeof(coordsstring),"{F3FF02} SLOT 1: Model:[%s] |CarID:[%d] | Pret:[%d] | Color1:[%d] | Color2:[%d] | Locked:[%d] | Alarma:[%d]\n", CarInfo[carkey][cDescription],carkey, CarInfo[carkey][cValue], CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], CarInfo[carkey][cLock]); strcat(bigstring,coordsstring); } if (PlayerInfo[playerid][pPcarkey2] != 999) { format(coordsstring, sizeof(coordsstring),"{F3FF02} SLOT 2: Model:[%s] |CarID:[%d] | Pret:[%d] | Color1:[%d] | Color2:[%d] | Locked:[%d] | Alarma:[%d]\n", CarInfo[carkey2][cDescription],carkey2, CarInfo[carkey2][cValue], CarInfo[carkey2][cColorOne], CarInfo[carkey2][cColorTwo], CarInfo[carkey2][cLock]); strcat(bigstring,coordsstring); } if (PlayerInfo[playerid][pPcarkey3] != 999) { format(coordsstring, sizeof(coordsstring),"{F3FF02} SLOT 3: Model:[%s] |CarID:[%d] | Pret:[%d] | Color1:[%d] | Color2:[%d] | Locked:[%d] | Alarma:[%d]\n", CarInfo[carkey3][cDescription],carkey3, CarInfo[carkey3][cValue], CarInfo[carkey3][cColorOne], CarInfo[carkey3][cColorTwo], CarInfo[carkey3][cLock]); strcat(bigstring,coordsstring); } if (PlayerInfo[targetid][pPboatkey] != 999) { format(coordsstring, sizeof(coordsstring),"{F3FF02} SLOT 4: Model:[%s] |CarID:[%d] | Pret:[%d] | Color1:[%d] | Color2:[%d] | Locked:[%d] | Alarma:[%d]\n", BoatInfo[boatkey][bbDescription],boatkey, BoatInfo[boatkey][bValue], BoatInfo[boatkey][bbColorOne], BoatInfo[boatkey][bbColorTwo], BoatInfo[boatkey][bbLock]);} strcat(bigstring,coordsstring); } if (PlayerInfo[targetid][pPelikey] != 999) { format(coordsstring, sizeof(coordsstring),"{F3FF02} SLOT 5: Model:[%s] |CarID:[%d] | Pret:[%d] | Color1:[%d] | Color2:[%d] | Locked:[%d] | Alarma:[%d]\n", EliInfo[elikey][eDescription],elikey, EliInfo[elikey][eValue], EliInfo[elikey][eColorOne], EliInfo[elikey][eColorTwo], EliInfo[elikey][eLock]);} strcat(bigstring,coordsstring); } strcat(bigstring,"{FFFFFF}|______________________________________________| wWw.dG-Ro.Tk |__________________________________________________|"); //return 1; //} //} ShowPlayerDialog(playerid,6518,0,"Statistici",bigstring,"Ok",""); } }