25.03.2015, 07:21
Hi Guys , I Got A Problem.
When I'm Admin And I Want To Check Player's Weapons & Ammo , But It Always Pop Up " * You Have No Permission To Use This Command !" But I'm An Admin , All Admin(Level) Can't Use That Command , Idk Why , I Tried To Solved But I'm A Newbie , So Someone Can Help Me To Let All Admins(Level) Can Use That Command? Thanks !
Sorry About My Bad English Btw.
Here Is My Code , Something Went Wrong?
When I'm Admin And I Want To Check Player's Weapons & Ammo , But It Always Pop Up " * You Have No Permission To Use This Command !" But I'm An Admin , All Admin(Level) Can't Use That Command , Idk Why , I Tried To Solved But I'm A Newbie , So Someone Can Help Me To Let All Admins(Level) Can Use That Command? Thanks !
Sorry About My Bad English Btw.
Here Is My Code , Something Went Wrong?
PHP код:
CMD:cw(playerid, params[])
{
if(pInfo[playerid][Adminlevel] <= 0)
{
new count = 0;
new ammo, weaponid, weapon[30], string26[150], id;
if(!sscanf(params, "u", id))
{
for (new c = 0; c < 13; c++)
{
GetPlayerWeaponData(id, c, weaponid, ammo);
if (weaponid != 0 && ammo != 0)
{
count++;
}
}
SendClientMessage(playerid, COLOR_ORANGE, "||{FF8000}============={FFFF00} Weapons And Ammo {FF8000}===========||");
if(count > 0)
{
for (new c = 0; c < 13; c++)
{
GetPlayerWeaponData(id, c, weaponid, ammo);
if (weaponid != 0 && ammo != 0)
{
GetWeaponName(weaponid, weapon, 24);
format(string26, sizeof(string26), "Weapons: {A8FFA8}%s {FF0000}.:. {00FF00}Ammo: {A8FFA8}%d", weapon, ammo);
SendClientMessage(playerid, COLOR_GREEN, string26);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "* This Player Has No Weapons !");
}
return 1;
}
else return SendClientMessage(playerid, COLOR_RED, "[Usage]: /cw [PlayerID]");
}
else return SendClientMessage(playerid, COLOR_RED, "* You Have No Permission To Use This Command !");
}