19.09.2018, 03:59
Код:
command(grabgun, 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;
GetPlayerName(playerid, sendername, sizeof(sendername));
//DestroyDynamicObject(DropObject[i]);
GivePlayerWeapon(playerid,DropInfo[i][DropGunAmmount][0],DropInfo[i][DropGunAmmount][1]);
format(string, sizeof(string), "* %s picks up the weapon from the ground.", sendername);
SendLocalMessage(playerid, string, 10.0, COLOR_PURPLE, COLOR_PURPLE);
return 1;
}
}
}
return 1;
}
