16.09.2011, 16:12
(
Последний раз редактировалось Da' J'; 17.09.2011 в 13:50.
Причина: NOT SOLVED!! HELP!!
)
So i need some help with dropgun FS. Here's the code:
Posted the same here as in the FS post, as they won't never help there :/ So the problem is that the weapon ain't coming in my hand after i type /pickitem.
pawn Код:
//=================//
command(pickitem, playerid, params[])
{
for(new i = 0; i < sizeof(DropInfo); i++)
{
if (IsPlayerInRangeOfPoint(playerid, 2.0,DropInfo[i][DropGunPosX],DropInfo[i][DropGunPosY],DropInfo[i][DropGunPosZ]))
{
if(GetPlayerVirtualWorld(playerid) == DropInfo[i][DropGunVWorld] && GetPlayerInterior(playerid) == DropInfo[i][DropGunVWorld])
{
GetPlayerName(playerid, sendername, sizeof(sendername));
DestroyDynamicObject(DropObject[i]);
DropInfo[i][DropGunPosX] = 0.0;
DropInfo[i][DropGunPosY] = 0.0;
DropInfo[i][DropGunPosZ] = 0.0;
DropInfo[i][DropGunAmmount][0] = 0;
DropInfo[i][DropGunAmmount][1] = 0;
GivePlayerWeapon(playerid,DropInfo[i][DropGunAmmount][0],DropInfo[i][DropGunAmmount][1]);
format(string, sizeof(string), "* %s picks up a weapon off the ground.", sendername);
SendLocalMessage(playerid, string, 10.0, COLOR_ACTION, COLOR_ACTION);
ApplyAnimation(playerid,"BOMBER","BOM_PLANT",3.0,0,0,0,0,0,0);
return 1;
}
}
}
return 1;
}
//=================//