27.12.2012, 21:32
Ok so when I edited my frisk system I get about 5 billion errors and warnings, the type where I know none of them are actually errors, but there is simthing wrong with what I just edited... But what?
Here is the command:
Here is the command:
pawn Код:
if(strcmp(cmd,"/friskinv",true)==0 || strcmp(cmd,"/friskinventory",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/friskinv)entory [playerid/PartOfName]");
return 1;
}
if(PlayerInfo[playerid][pDBanned] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "* You are Banned from Cop Duty!");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(5.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Frisk yourself!"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "|__________ %s Inventory __________|", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
for (new i=0; i<12; i++)// Begining of change I made that caused errors.
{
GetPlayerWeaponData(giveplayerid, i, sweapon, sammo);
GetWeaponName(sweapon, gunname, sizeof(gunname));
if(sweapon != 0)
{
format(string, sizeof(string), "Slot %d: %s [ID: %d Ammo: %d]", i, gunname,sweapon, sammo);
SendClientMessage(playerid, COLOR_GREY, string);
}
if(sweapon == 0)
{
SendClientMessage(playerid, COLOR_GREY, "| Weapon Inventory is empty.|");
)
}//End of what I edited that caused errors.
format(string, sizeof(string), " %s has frisked you for anything that could be harmful.", sendername);
SendClientMessage(giveplayerid, COLOR_GREY, string);
return 1;
}
}
}
}
return 1;
}