http://sampforum.hu/index.php?topic=17525.0
Ez nem parancsal, megy, hanem amikor x megöli y-t és y-nak el lesz dobva a halála helyén lesznek a fegyverei!
Egyébként ez pickup és nem object.
megcsináltam parancsosra , nem teszteltem, lehet h nemjó
rem Sramm nem haragszik ezér
de nem publikálom csak segítek
[pawn]#include <a_samp>
#pragma tabsize 0
#define COLOR_ZOLD 0x9EC73DAA
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Fegyver eldobás by Sramm\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
DestroyPickup(pickupid);
return 1;
}
stock GetPlayerWeaponModell(playerid,modell)
{
new weaponid;
weaponid = GetPlayerWeapon(playerid);
switch(weaponid)
{
case 0: modell = 0;
case 1: modell = 331;
case 2: modell = 333;
case 3: modell = 334;
case 4: modell = 335;
case 5: modell = 336;
case 6: modell = 337;
case 7: modell = 338;
case 8: modell = 339;
case 9: modell = 341;
case 10: modell = 321;
case 11: modell = 322;
case 12: modell = 323;
case 13: modell = 324;
case 14: modell = 325;
case 15: modell = 326;
case 16: modell = 342;
case 17: modell = 343;
case 18: modell = 344;
case 19: modell = 0;
case 20: modell = 0;
case 21: modell = 0;
case 22: modell = 345;
case 23: modell = 346;
case 24: modell = 347;
case 25: modell = 348;
case 26: modell = 349;
case 27: modell = 350;
case 28: modell = 351;
case 29: modell = 352;
case 30: modell = 353;
case 31: modell = 356;
case 32: modell = 372;
case 33: modell = 357;
case 34: modell = 358;
case 35: modell = 359;
case 36: modell = 360;
case 37: modell = 361;
case 38: modell = 362;
case 39: modell = 363;
case 40: modell = 364;
case 41: modell = 365;
case 42: modell = 366;
case 43: modell = 367;
case 44: modell = 368;
case 45: modell = 369;
case 46: modell = 371;
}
return modell;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/eldob\", true) == 0)
{
new fegyverid;
fegyverid = GetPlayerWeaponModell(playerid,fegyverid);
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
AddStaticPickup(fegyverid, 15, x,y,z);
SendClientMessage(playerid,COLOR_ZOLD,\"Eldobtad a fegyvert ami a kezedben volt\");
}
return 1;
}[/pawn]