Skripta koju koristim:Moja
Detaljan opis problema:Nije problem ali me zanima kako da igrac ispusti svoja oruzija nakon sto ga neko ubije?
Dio skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno): /
[Pomoc]Kako da igrac ispusti svoja oruzija kad ga neko ubije?
320
pregleda
6
postova
25. Feb. 2015.
Eto ti cijeli drop gun ti ga ubaci:
// This is a comment.
// ^^lol a comment.
//=================//
#include // by SA-MP
#include // by Incognito
#include // by Zeex
#include // by y_Less
//=================//
#define MAX_DROP_ITEMS 1000//Change it to set the max weapons that can be dropped.
#define COLOR_ACTION 0xFFC0CBFF//Gay Pink Color
//=================//
new string, sendername, DropObject;
//=================//
enum dData
{
DropGunAmmount,//ModelID & Bullets
Float:DropGunPosX,
Float:DropGunPosY,
Float:DropGunPosZ,
DropGunVWorld,
DropGunInterior,
};
new DropInfo;
//=================//
new GunObjectIDs ={
1575, 331, 333, 334, 335, 336, 337, 338, 339, 341, 321, 322, 323, 324, 325, 326, 342, 343, 344, -1, -1 , -1 ,
346, 347, 348, 349, 350, 351, 352, 353, 355, 356, 372, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
368, 369, 1575
};
//=================//
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Drop Gun FS by a fat guy.....Loaded!!!");
print("--------------------------------------\n");
return 1;
}
//=================//
stock GetGunObjectID(WeaponID)
{
if (WeaponID < 0 || WeaponID > 64)
{
return 1575;
}
return GunObjectIDs;
}
//=================//
stock DropGun(playerid, GunID, GunAmmo, Float:X, Float:Y, Float:Z, world, interior)
{
new name;
GetPlayerName(playerid,name,sizeof(name));
if(GunID != 0 && GunAmmo != 0)
{
for(new i = 0; i < sizeof(DropInfo); i++)
{
if(DropInfo == 0.0 && DropInfo == 0.0 && DropInfo == 0.0)
{
DropInfo = GunID;
DropInfo = GunAmmo;
DropInfo = X;
DropInfo = Y;
DropInfo = Z;
DropInfo = world;
DropInfo = interior;
DropObject = CreateDynamicObject(GetGunObjectID(GunID), X, Y, Z-1, 80.0, 0.0, 0.0, world);
return 1;
}
}
return 1;
}
return 1;
}
//=================//
stock RemovePlayerWeapon(playerid, weaponid)//Credits to Xalphox
{
if(!IsPlayerConnected(playerid) || weaponid < 0 || weaponid > 50)
return;
new saveweapon, saveammo;
for(new slot = 0; slot < 13; slot++)
GetPlayerWeaponData(playerid, slot, saveweapon, saveammo);
ResetPlayerWeapons(playerid);
for(new slot; slot < 13; slot++)
{
if(saveweapon == weaponid || saveammo == 0)
continue;
GivePlayerWeapon(playerid, saveweapon, saveammo);
}
GivePlayerWeapon(playerid, 0, 1);
}
//=================//
public OnFilterScriptExit()
{
print("Drop Gun FS by a fat guy.....Unloaded :( ");
return 1;
}
//=================//
public OnPlayerDeath(playerid, killerid, reason)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
DropGun(playerid, GetPlayerWeapon(playerid),GetPlayerAmmo(playerid),X,Y,Z,GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
return 1;
}
//=================//
command(dropgun, playerid, params[])
{
new Float:X,Float:Y,Float:Z;
new GunID = GetPlayerWeapon(playerid);
new GunAmmo = GetPlayerAmmo(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid, X, Y, Z);
RemovePlayerWeapon(playerid, GunID);
DropGun(playerid, GunID,GunAmmo,X,Y,Z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid));
format(string, sizeof(string), "* %s drops his weapon to the pavement.", sendername);
SendLocalMessage(playerid, string, 10.0, COLOR_ACTION, COLOR_ACTION);
return 1;
}
//=================//
command(pickupgun, playerid, params[])
{
for(new i = 0; i < sizeof(DropInfo); i++)
{
if (IsPlayerInRangeOfPoint(playerid, 2.0,DropInfo,DropInfo,DropInfo))
{
if(GetPlayerVirtualWorld(playerid) == DropInfo && GetPlayerInterior(playerid) == DropInfo)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
DestroyDynamicObject(DropObject);
DropInfo = 0.0;
DropInfo = 0.0;
DropInfo = 0.0;
DropInfo = 0;
DropInfo = 0;
GivePlayerWeapon(playerid,DropInfo,DropInfo);
format(string, sizeof(string), "* %s picks up a weapon from the pavement.", sendername);
SendLocalMessage(playerid, string, 10.0, COLOR_ACTION, COLOR_ACTION);
return 1;
}
}
}
return 1;
}
//=================//
stock SendLocalMessage(playerid, msg[], Float:MessageRange, Range1color, Range2color)
{
new Float: PlayerX, Float: PlayerY, Float: PlayerZ;
GetPlayerPos(playerid, PlayerX, PlayerY, PlayerZ);
foreach (Player, i)
{
if(IsPlayerInRangeOfPoint(i, MessageRange, PlayerX, PlayerY,PlayerZ))
{
SendClientMessage(i, Range1color, msg);
}
else if(IsPlayerInRangeOfPoint(i, MessageRange/2.0, PlayerX, PlayerY,PlayerZ))
{
SendClientMessage(i, Range2color, msg);
}
}
}
25. Feb. 2015.
Nije komande posto vidim da nisi nista od toga pogledo, imas u public onplayerdeath:
PS. Ako ti treba taj sistem da igrac ispusti oruzije kopiraj cijeli sistem osim komanda...
PS. Ako ti treba taj sistem da igrac ispusti oruzije kopiraj cijeli sistem osim komanda...
public OnPlayerDeath(playerid, killerid, reason)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
DropGun(playerid, GetPlayerWeapon(playerid),GetPlayerAmmo(playerid),X,Y,Z,GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
return 1;
}
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava