Код:
}
if(strcmp(cmd,"/frisk",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /frisk [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(ProxDetectorS(8.0, playerid, giveplayerid))
{
if(playerid == giveplayerid) return SendClientMessage(playerid,COLOR_GREY," You cannot frisk yourself.");
if(PlayerTied[giveplayerid] || PlayerCuffed[giveplayerid])
{
new WeaponName[65];
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(string, sizeof(string), "*** %s's Items ***", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
if(PlayerInfo[giveplayerid][pCash] > 0) format(string,sizeof(string),"Money (%d)",PlayerInfo[giveplayerid][pCash]); SendClientMessage(playerid,COLOR_GREY,string);
if(PlayerInfo[giveplayerid][pPot] > 0) format(string,sizeof(string),"Marijuana (%dg)",PlayerInfo[giveplayerid][pPot]); SendClientMessage(playerid,COLOR_BITEM,string);
if(PlayerInfo[giveplayerid][pCrack] > 0) format(string,sizeof(string),"Crack Cocaine (%dg)",PlayerInfo[giveplayerid][pCrack]); SendClientMessage(playerid,COLOR_BITEM,string);
if(PlayerInfo[giveplayerid][pPotSeeds] > 0) format(string,sizeof(string),"Seeds (%dg)",PlayerInfo[giveplayerid][pPotSeeds]); SendClientMessage(playerid,COLOR_BITEM,string);
if(PlayerInfo[giveplayerid][pMats] > 0) format(string,sizeof(string),"Materials (%d)",PlayerInfo[giveplayerid][pMats]); SendClientMessage(playerid,COLOR_BITEM,string);
if(Packages[playerid] > 0) SendClientMessage(playerid, COLOR_BITEM, "Materials Packages");
if(Crates[playerid] > 0) SendClientMessage(playerid, COLOR_BITEM, "Drug Crates");
if(Fishes[giveplayerid][pWeight1] > 0 || Fishes[giveplayerid][pWeight2] > 0 || Fishes[giveplayerid][pWeight3] > 0 || Fishes[giveplayerid][pWeight4] > 0 || Fishes[giveplayerid][pWeight5] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Fish");
if(PlayerInfo[giveplayerid][pPhoneBook] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Phone Book");
if(PlayerInfo[giveplayerid][pCDPlayer] > 0) SendClientMessage(playerid, COLOR_GRAD3, "CD Player");
if(PlayerInfo[giveplayerid][pPnumber] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Cellphone");
if(PlayerInfo[giveplayerid][pSpraycan] > 0) format(string,sizeof(string),"Spraycans (%d)",PlayerInfo[giveplayerid][pSpraycan]); SendClientMessage(playerid,COLOR_GREY,string);
if(PlayerInfo[giveplayerid][pScrew] > 0) format(string,sizeof(string),"Screwdrivers (%d)",PlayerInfo[giveplayerid][pScrew]); SendClientMessage(playerid,COLOR_GREY,string);
if(PlayerInfo[giveplayerid][pDice] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Dice");
if(PlayerInfo[giveplayerid][pRope] > 0) format(string,sizeof(string),"Rope (%d)",PlayerInfo[giveplayerid][pRope]); SendClientMessage(playerid,COLOR_GREY,string);
if(PlayerInfo[giveplayerid][pCigars] > 0) format(string,sizeof(string),"Cigars (%d)",PlayerInfo[giveplayerid][pCigars]); SendClientMessage(playerid,COLOR_GREY,string);
if(PlayerInfo[giveplayerid][pSprunk] > 0) format(string,sizeof(string),"Sprunk (%d)",PlayerInfo[giveplayerid][pSprunk]); SendClientMessage(playerid,COLOR_GREY,string);
if(PlayerInfo[giveplayerid][pBombs] > 0) SendClientMessage(playerid, COLOR_BITEM, "C4 Explosives");
if(HasBoughtMask[giveplayerid] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Ski-Mask");
if(PlayerInfo[giveplayerid][pBlindfolds] > 0) format(string,sizeof(string),"Blindfolds (%d)",PlayerInfo[giveplayerid][pBlindfolds]); SendClientMessage(playerid,COLOR_GREY,string);
if(PlayerInfo[giveplayerid][pGun0] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun0], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun1] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun1], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun2] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun2], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun3] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun3], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun4] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun4], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun5] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun5], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun6] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun6], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun7] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun7], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun8] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun8], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun9] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun9], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun10] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun10], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
if(PlayerInfo[giveplayerid][pGun11] == 44) { SendClientMessage(playerid, COLOR_GRAD3, "Nightvision Goggles"); }
if(PlayerInfo[giveplayerid][pGun11] == 45) { SendClientMessage(playerid, COLOR_GRAD3, "Infared Goggles"); }
if(PlayerInfo[giveplayerid][pGun12] != 0) { GetWeaponName(PlayerInfo[giveplayerid][pGun12], WeaponName, 64); format(string, sizeof(string), "%s", WeaponName); SendClientMessage(playerid, COLOR_BITEM, string); }
for (new weap = 1; weap < 47; weap++)
{
if(HaveAdminWeapon(giveplayerid, weap) == weap)
{
GetWeaponName(weap, WeaponName, 64);
format(string, sizeof(string), "Admin Given %s", WeaponName);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(string, sizeof(string), "* %s has frisked %s.", PlayerName(playerid),PlayerName(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
format(string, sizeof(string), "* You offered to frisk %s.",PlayerName(giveplayerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s wants to frisk you, (type /accept frisk) to accept.",PlayerName(playerid));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
FriskOffer[giveplayerid] = playerid;
}
}
else
{
return SendClientMessage(playerid, COLOR_GREY, " That player is not near you.");
}
}
}
else
{
return SendClientMessage(playerid, COLOR_GREY, " That player is offline.");
}
}
return 1;
}
Enjoy, I hope that I helped you! a reputation would make me able to reach up my destination! I really just appreciate it