24.04.2012, 16:44
I want so the weapon come on the back here is the codes for all weapons, can someone helpme?
weapon
cmd
weapon
pawn Код:
if(gun == 2)
{
SetPlayerAttachedObject(playerid, 4,333,1,0.3,-0.1,0.1,0.0,230.0,0.0);
}
else if(gun == 3)
{
SetPlayerAttachedObject(playerid, 4,334,7,0.0,-0.0,-0.0,0.0,90.0,0.0);
}
else if(gun == 4)
{
SetPlayerAttachedObject(playerid, 4,335,7,0.0,-0.1,-0.1,0.0,90.0,90.0);
}
else if(gun == 5)
{
SetPlayerAttachedObject(playerid, 4,336,1,0.3,-0.1,0.1,0.0,230.0,0.0);
}
else if(gun == 7)
{
SetPlayerAttachedObject(playerid, 4,338,1,0.3,-0.1,0.1,0.0,230.0,0.0);
}
else if(gun == 8)
{
SetPlayerAttachedObject(playerid, 4,339,1,0.3,-0.1,0.1,0.0,230.0,0.0);
}
else if(gun == 10)
{
SetPlayerAttachedObject(playerid, 4,321,7,0.3,-0.0,-0.2,0.0,280.0,0.0);
}
else if(gun == 11)
{
SetPlayerAttachedObject(playerid, 4,322,7,0.2,-0.0,-0.0,0.0,90.0,0.0);
}
else if(gun == 12)
{
SetPlayerAttachedObject(playerid, 4,323,7,0.3,-0.0,-0.2,0.0,280.0,0.0);
}
else if(gun == 13)
{
SetPlayerAttachedObject(playerid, 4,324,7,0.2,-0.0,-0.0,0.0,90.0,0.0);
}
else if(gun == 15)
{
SetPlayerAttachedObject(playerid, 4,326,1,0.3,-0.1,0.1,0.0,230.0,0.0);
}
else if(gun == 16)
{
SetPlayerAttachedObject(playerid, 4,342,7,0.0,0.0,-0.1,0.0,270.0,0.0);
}
else if(gun == 17)
{
SetPlayerAttachedObject(playerid, 4,343,7,0.0,0.0,-0.1,0.0,270.0,0.0);
}
else if(gun == 18)
{
SetPlayerAttachedObject(playerid, 4,344,7,0.0,0.0,-0.1,0.0,270.0,0.0);
}
else if(gun == 22)
{
SetPlayerAttachedObject(playerid, 4,346,8,-0.1,0.0,0.1,270.0,0.0,0.0);
}
else if(gun == 23)
{
SetPlayerAttachedObject(playerid, 4,347,8,-0.1,0.0,0.1,270.0,0.0,0.0);
}
else if(gun == 24)
{
SetPlayerAttachedObject(playerid, 4,348,8,-0.1,0.0,0.1,270.0,0.0,0.0);
}
else if(gun == 25)
{
SetPlayerAttachedObject(playerid, 4,349,1,0.2,-0.1,0.2,180.0,40.0,180.0);
}
else if(gun == 26)
{
SetPlayerAttachedObject(playerid, 4,350,8,-0.1,0.0,0.1,270.0,0.0,0.0);
}
else if(gun == 27)
{
SetPlayerAttachedObject(playerid, 4,351,1,0.2,-0.1,0.3,180.0,40.0,186.0);
}
else if(gun == 28)
{
SetPlayerAttachedObject(playerid, 4,372,8,0.1,0.0,0.1,270.0,270.0,0.0);
}
else if(gun == 29)
{
SetPlayerAttachedObject(playerid, 4,353,8,0.1,-0.1,0.1,270.0,0.0,0.0);
}
else if(gun == 30)
{
SetPlayerAttachedObject(playerid, 4,355,1,0.2,-0.1,0.2,180.0,40.0,180.0);
}
else if(gun == 31)
{
SetPlayerAttachedObject(playerid, 4,356,1,0.2,-0.1,0.2,180.0,40.0,180.0);
}
else if(gun == 32)
{
SetPlayerAttachedObject(playerid, 4,372,8,0.1,0.0,0.1,270.0,270.0,0.0);
}
else if(gun == 33)
{
SetPlayerAttachedObject(playerid, 4,357,1,0.2,-0.1,0.2,180.0,40.0,180.0);
}
else if(gun == 34)
{
SetPlayerAttachedObject(playerid, 4,358,1,0.2,-0.1,0.2,180.0,40.0,180.0);
}
else if(gun == 35)
{
SetPlayerAttachedObject(playerid, 4,359,1,0.1,-0.2,-0.2,0.0,50.0,0.0);
}
else if(gun == 42)
{
SetPlayerAttachedObject(playerid, 4,366,1,0.4,-0.2,0.1,180.0,50.0,180.0);
}
else if(gun == 41)
{
SetPlayerAttachedObject(playerid, 4,365,7,0.0,0.0,-0.1,0.0,270.0,0.0);
cmd
pawn Код:
}
if(!strcmp(cmdtext, "/putgun", true))
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pInvWeapon] != 0 || PlayerInfo[playerid][pInvAmmo] != 0)
{
SendClientMessage(playerid, COLOR_GREY, " You have placed something at your inventory already !");
return 1;
}
if(GetPlayerPing(playerid) >= 700)
{
SendClientMessage(playerid, COLOR_GREY, "Your ping is too high to do this command.");
return 1;
}
new gunID = GetPlayerWeapon(playerid);
new gunAmmo = GetPlayerAmmo(playerid);
if(gunID != 0 && gunAmmo != 0)
{
RemovePlayerWeaponEx(playerid, gunID);
PlayerInfo[playerid][pInvWeapon] = gunID;
PlayerInfo[playerid][pInvAmmo] = gunAmmo;
new gunname[100];
GetWeaponName(gunID, gunname, sizeof(gunname));
format(string, sizeof(string), " You put %s in your inventory.", gunname);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have a gun to put in ! ");
return 1;
}
}
return 1;