/drop gun help?
#9

Quote:
Originally Posted by XBrianX
Посмотреть сообщение
Try using my command:

PHP код:
CMD:dropgun(playeridparams[]) 

    if(
IsPlayerInAnyVehicle(playerid)) { 
        
SendClientMessageEx (playeridCOLOR_GRAD2"You can not drop weapons in a vehicle!"); 
        return 
1
    } 
    new 
gunid GetPlayerWeapon(playerid); 
    if(
gunid) { 
        new 
100+1
        for(new 
0sizeof(ObjCoords); a++) { 
            if(
ObjCoords[a][0] == 0.0) { 
                
a
                break; 
            } 
        } 
        if(
100) return SendClientMessage(playeridCOLOR_GREY"You can not throw weapons at the moment, try back later!!"); 
        new 
WeaponName[65], sendername[MAX_PLAYER_NAME]; 
        new 
string[128]; 
        
GetPlayerName(playeridsendernamesizeof(sendername)); 
        
GetWeaponName(gunidWeaponName64); 
        if(
gunid == 18) { WeaponName "Molotovs"; } 
        if(
gunid == 44) { WeaponName "Nightvision Goggles"; } 
        if(
gunid == 45) { WeaponName "Infared Goggles"; } 
        
RemovePlayerWeapon(playerid,gunid); 
        
ObjectID[f][0] = gunid
        
GetPlayerPos(playeridObjCoords[f][0], ObjCoords[f][1], ObjCoords[f][2]); 
        
object[f] = CreateDynamicObject(GunObjects[gunid][0],ObjCoords[f][0],ObjCoords[f][1],ObjCoords[f][2]-1,93.7,120.0,120.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1100.0); 
        
SetTimerEx("DeleteGun"5000000"d"object[f]); 
        
format(stringsizeof(string), "* %s has thrown away their %s."sendernameWeaponName); 
        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
        } 
    else 
    { 
        
SendClientMessageEx(playeridCOLOR_GRAD1"You Don't have guns"); 
    } 
    return 
1

I'm sure it'll work because sets the weapon on ground position.
PHP код:
 GetPlayerPos(playeridObjCoords[f][0], ObjCoords[f][1], ObjCoords[f][2]); 
        
object[f] = CreateDynamicObject(GunObjects[gunid][0],ObjCoords[f][0],ObjCoords[f][1],ObjCoords[f][2]-1,93.7,120.0,120.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1100.0); 
I will try to fix mine, thanks anyway
Reply


Messages In This Thread
/drop gun help? - by N0FeaR - 14.11.2015, 13:09
Re: /drop gun help? - by Domatite - 14.11.2015, 14:01
Re: /drop gun help? - by XBrianX - 14.11.2015, 14:56
Re: /drop gun help? - by XBrianX - 14.11.2015, 15:02
Re: /drop gun help? - by Abagail - 14.11.2015, 15:11
Re: /drop gun help? - by N0FeaR - 14.11.2015, 19:56
Re: /drop gun help? - by N0FeaR - 14.11.2015, 19:59
Re: /drop gun help? - by XBrianX - 14.11.2015, 20:32
Re: /drop gun help? - by N0FeaR - 15.11.2015, 08:37
Re: /drop gun help? - by N0FeaR - 04.12.2015, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)