06.04.2012, 17:35
Para colocar armas nas costas:
PHP код:
#define SlotAKM4 1
if(!IsPlayerInAnyVehicle(playerid))
{
new Arma[MAX_PLAYERS],Bala[MAX_PLAYERS];
GetPlayerWeaponData(playerid, 5, Arma[playerid], Bala[playerid]);
if(Arma[playerid] == 30 && Bala[playerid] >= 1)//Ak-47
{
if(GetPlayerWeapon(playerid) == 30) RemovePlayerAttachedObject(playerid,SlotAKM4);
else SetPlayerAttachedObject(playerid, SlotAKM4, 355, 1, -0.060921, -0.141673, 0.000000, 0.000000, 35.362735, 0.000000);
}
else if(Arma[playerid] == 31 && Bala[playerid] >= 1) //M4
{
if(GetPlayerWeapon(playerid) == 31) RemovePlayerAttachedObject(playerid,SlotAKM4);
else SetPlayerAttachedObject(playerid, SlotAKM4, 356, 1, -0.099681, -0.133408, 0.000000, 1.027592, 19.667785, 0.000000);
}
else
{
RemovePlayerAttachedObject(playerid,SlotAKM4);
}
GetPlayerWeaponData(playerid, 3, Arma[playerid], Bala[playerid]);
}

