bom pessoal eu tenho uma gamemode aqui de samp dayz os items respawna tudo certo porem eu quero por pra quando o player morrer tropar todos os itens dele no chгo todos os itens que mostra no inventario se ele apertar a tecla " Y " quando ele morrer tudo que ele tinha vai pro chгo
PHP код:
if(dialogid == D_Veritem && response == 1 && listitem == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,1.0,pInfo[playerid][LootPosX],pInfo[playerid][LootPosY],pInfo[playerid][LootPosZ]))return SendClientMessage(playerid,-1,"{FFFFFF}* {D40000}Dont duplicate Items ! Or you will get Banned !");
else if(pInfo[playerid][LootLoc]==1)
{
new ItemID = pInfo[playerid][LootID], BackpackVolumen = GiveItem[playerid][Silenced] + GiveItem[playerid][Desert] +
GiveItem[playerid][Uzi] + GiveItem[playerid][MP5] + GiveItem[playerid][AK47] + GiveItem[playerid][M4A1] + GiveItem[playerid][Mapa] +
GiveItem[playerid][Remington] + GiveItem[playerid][GPS] + GiveItem[playerid][SPAS12] +
GiveItem[playerid][Country_Rifle] + GiveItem[playerid][Sniper_Rifle] + GiveItem[playerid][Gasolina_Vazia] +
GiveItem[playerid][Med_Kit] + GiveItem[playerid][Bandages] + GiveItem[playerid][Pain_killer] + GiveItem[playerid][Antibioticos] +
GiveItem[playerid][Morfina] + GiveItem[playerid][Hamburger] + GiveItem[playerid][Bife] + GiveItem[playerid][Fress_Milk] +
GiveItem[playerid][Pizza] + GiveItem[playerid][Agua_Cheia] + GiveItem[playerid][Agua_Vazia] + GiveItem[playerid][C4] +
GiveItem[playerid][Pistolammo] + GiveItem[playerid][Assaultammo] + GiveItem[playerid][Shotgunammo] + GiveItem[playerid][Sniperammo] +
GiveItem[playerid][Camo] + GiveItem[playerid][Radio] + GiveItem[playerid][Suco] + GiveItem[playerid][Sprunk] + GiveItem[playerid][Beans] + GiveItem[playerid][Whisky] +
GiveItem[playerid][Armyskin] + GiveItem[playerid][Sniperskin] + GiveItem[playerid][Civiliamskin] + GiveItem[playerid][Crazzyskin] + GiveItem[playerid][Carflugaem] +
GiveItem[playerid][Motor] + GiveItem[playerid][Pneu] + GiveItem[playerid][TollBox] + GiveItem[playerid][Gasolina_Cheia] + GiveItem[playerid][Gasolina_Vazia] +
GiveItem[playerid][tacoBaseball] + GiveItem[playerid][Katana] + GiveItem[playerid][Knife] + GiveItem[playerid][Cassetete];
if(BackpackVolumen >= 40 && pInfo[playerid][Backpack] == 2)return SendClientMessage(playerid,-1,"{DCDCDC}* {E6E6E6}Sua mochila esta cheia. ( 40/40 )");
else if(BackpackVolumen >= 25 && pInfo[playerid][Backpack] == 1)return SendClientMessage(playerid,-1,"{DCDCDC}* {E6E6E6}Sua mochila esta cheia. ( 25/25 )");
else if(BackpackVolumen >= 5 && pInfo[playerid][Backpack] == 0)return SendClientMessage(playerid,-1,"{DCDCDC}* {E6E6E6}Sua mochila esta cheia. ( 5/5 )");
if(pInfo[playerid][LootItem] == 1000)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Silenced]++;
else if(pInfo[playerid][LootItem] == 1001)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Desert]++;
else if(pInfo[playerid][LootItem] == 1002)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Uzi]++;
else if(pInfo[playerid][LootItem] == 1003)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][MP5]++;
else if(pInfo[playerid][LootItem] == 1004)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][AK47]++;
else if(pInfo[playerid][LootItem] == 1005)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][M4A1]++;
else if(pInfo[playerid][LootItem] == 1006)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Mapa]++;
else if(pInfo[playerid][LootItem] == 1007)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Remington]++;
else if(pInfo[playerid][LootItem] == 1008)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][GPS]++;
else if(pInfo[playerid][LootItem] == 1009)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][SPAS12]++;
else if(pInfo[playerid][LootItem] == 1010)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Country_Rifle]++;
else if(pInfo[playerid][LootItem] == 1011)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Sniper_Rifle]++;
else if(pInfo[playerid][LootItem] == 1012)
{
if(pInfo[playerid][Backpack] >= 1)return SendClientMessage(playerid,-1,"{DCDCDC}* {E6E6E6}Voce ja tem uma mochila maior");
DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][ALICE]++, CheckBackpack(playerid);
}
else if(pInfo[playerid][LootItem] == 1013)
{
if(pInfo[playerid][Backpack] >= 2)return SendClientMessage(playerid,-1,"{DCDCDC}* {E6E6E6}Voce ja tem uma mochila maior");
DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][COYOTE]++, CheckBackpack(playerid);
}
else if(pInfo[playerid][LootItem] == 1014)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Med_Kit]++;
else if(pInfo[playerid][LootItem] == 1015)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Bandages]++;
else if(pInfo[playerid][LootItem] == 1016)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Pain_killer]++;
else if(pInfo[playerid][LootItem] == 1017)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Antibioticos]++;
else if(pInfo[playerid][LootItem] == 1018)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Morfina]++;
else if(pInfo[playerid][LootItem] == 1019)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Hamburger]++;
else if(pInfo[playerid][LootItem] == 1020)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Bife]++;
else if(pInfo[playerid][LootItem] == 1021)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Fress_Milk]++;
else if(pInfo[playerid][LootItem] == 1022)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Pizza]++;
else if(pInfo[playerid][LootItem] == 1023)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Agua_Cheia]++;
else if(pInfo[playerid][LootItem] == 1024)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Agua_Vazia]++;
else if(pInfo[playerid][LootItem] == 1025)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,Maconhaplay[playerid] += 1;
else if(pInfo[playerid][LootItem] == 1026)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][C4]++;
else if(pInfo[playerid][LootItem] == 1027)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Pistolammo]++;
else if(pInfo[playerid][LootItem] == 1028)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Assaultammo]++;
else if(pInfo[playerid][LootItem] == 1029)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Shotgunammo]++;
else if(pInfo[playerid][LootItem] == 1030)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Sniperammo]++;
else if(pInfo[playerid][LootItem] == 1031)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Camo]++;
else if(pInfo[playerid][LootItem] == 1032)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Radio]++;
else if(pInfo[playerid][LootItem] == 1033)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Suco]++;
else if(pInfo[playerid][LootItem] == 1034)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Sprunk]++;
else if(pInfo[playerid][LootItem] == 1035)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Beans]++;
else if(pInfo[playerid][LootItem] == 1036)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Whisky]++;
else if(pInfo[playerid][LootItem] == 1037)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Armyskin]++;
else if(pInfo[playerid][LootItem] == 1038)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Sniperskin]++;
else if(pInfo[playerid][LootItem] == 1039)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Civiliamskin]++;
else if(pInfo[playerid][LootItem] == 1040)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Crazzyskin]++;
else if(pInfo[playerid][LootItem] == 1041)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Carflugaem]++;
else if(pInfo[playerid][LootItem] == 1042)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Motor]++;
else if(pInfo[playerid][LootItem] == 1043)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Pneu]++;
else if(pInfo[playerid][LootItem] == 1044)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][TollBox]++;
else if(pInfo[playerid][LootItem] == 1045)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Gasolina_Cheia]++;
else if(pInfo[playerid][LootItem] == 1046)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Gasolina_Vazia]++;
else if(pInfo[playerid][LootItem] == 1047)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Lanterna]++;
else if(pInfo[playerid][LootItem] == 1048)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][tacoBaseball]++;
else if(pInfo[playerid][LootItem] == 1049)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Katana]++;
else if(pInfo[playerid][LootItem] == 1050)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Knife]++;
else if(pInfo[playerid][LootItem] == 1051)return DestroyDynamicObject(SpawnItems[ItemID][ItemPickup]),DestroyDynamic3DTextLabel(SpawnItems[ItemID][ItemLabel]),SpawnItems[ItemID][ItemBenutz] =1,GiveItem[playerid][Cassetete]++;
{
}
return 1;
}
return 1;
}
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
GameTextForPlayer(playerid,"~n~~n~~r~You Are Killerd",3000,3);
new sStr[40];
format(sStr, 40, "~w~%s ~w~Foi ~r~Morto.", PegarNome(playerid));
TextDrawSetString(Msgentrosai, sStr);
TextDrawShowForAll(Msgentrosai);
morreu[playerid] = true;
Usandogps[playerid] = false;
Usandomapa[playerid] = false;
Usandoradio[playerid] = false;
Usandocamo[playerid] = false;
Usandolanterna[playerid] = false;
SetProgressBarValue(Fome, 0);
UpdateProgressBar(Fome, playerid);
SetProgressBarValue(Sede, 0);
UpdateProgressBar(Sede, playerid);
SetProgressBarValue(Frio, 0);
UpdateProgressBar(Frio, playerid);
SetProgressBarValue(Kills, 0);
UpdateProgressBar(Kills, playerid);
new Float:KillX, Float:KillY, Float:KillZ;
GetPlayerPos(playerid, KillX, KillY, KillZ);
CreateDynamicObject(2907, KillX, KillY, KillZ -0.9, 0, 0, 0);
return 1;
}