drop gun problem
#1

When i drop the gun is wont come up on the ground

pawn Код:
COMMAND:dropgun(playerid, params[])
{
    if(PlayerInfo[playerid][pConnectTime] < 3)
    {
        return SendClientMessage(playerid, COLOR_GREY, " This command is restricted to: TLS 3 and above");
    }
    if (GetPlayerWeapon(playerid) < 2 || GetPlayerWeapon(playerid) > 34)
    {
         SendClientMessage(playerid, COLOR_GREY, " You cannot drop this weapon !");
         return 1;
    }

    new Float:PlayersHealth;
    GetPlayerHealth(playerid, PlayersHealth);
    if (PlayersHealth == 0.0)
    {
          SendClientMessage(playerid, COLOR_GREY, " You have no access to drop this weapon at your health !");
          return 1;
    }
    new giveplayerid;
    new gunID = GetPlayerWeapon(playerid);
    new gunAmmo = GetPlayerAmmo(playerid);
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    RemovePlayerWeaponEx(playerid, gunID);
    SendClientMessage(playerid, COLOR_GREY, " You dropped your weapon onto the ground.");
    DropWeapons(gunID,gunAmmo,x,y,z,GetPlayerVirtualWorld(playerid),playerid);
    if(PlayerInfo[playerid][pSex] == 1)
    {
        PlayerPlayerActionMessage(playerid,giveplayerid,20.0,"drops his weapon to the ground.");
    } else {
        PlayerPlayerActionMessage(playerid,giveplayerid,20.0,"drops her weapon to the ground.");
    }
    return 1;
}
Reply


Messages In This Thread
drop gun problem - by N0FeaR - 04.06.2012, 19:15
Re: drop gun problem - by Firo - 04.06.2012, 19:23
Re: drop gun problem - by tiernantheman - 04.06.2012, 19:32
Re: drop gun problem - by N0FeaR - 04.06.2012, 19:34
Re: drop gun problem - by tiernantheman - 04.06.2012, 19:38
Re: drop gun problem - by Firo - 04.06.2012, 19:38
Re: drop gun problem - by N0FeaR - 04.06.2012, 20:36

Forum Jump:


Users browsing this thread: 3 Guest(s)