PI
The world on the edge of reality
PHP:
if(strcmp(cmd, "/givegunall", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Используйте: /giveginall [playerid/PartOfName] [ammo]");
return 1;
}
new playa;
new ammo;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
ammo = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GivePlayerWeapon(playa, 24, ammo);//eagle
GivePlayerWeapon(playa, 30, ammo);//ak-47
GivePlayerWeapon(playa, 25, ammo);//дробовик
GivePlayerWeapon(playa, 29, ammo);//мп5
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Вы не можете использовать эту команду!");
}
}
return 1;
}