Szerző Téma: Pickup Money FilterScript Hiba  (Megtekintve 1455 alkalommal)

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Pickup Money FilterScript Hiba
« Dátum: 2011. szeptember 03. - 23:20:01 »
0 Show voters
[pawn]#include <a_samp>
new cash;
new cash2;
new cash3;
new cash4;
new cash5;
static gTeam[MAX_PLAYERS];
public OnPlayerPickUpPickup(playerid, pickupid)
{
   if(pickupid == cash){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash2){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash3){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash4){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash5){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
        return 1;
        }
       
public OnPlayerDeath(playerid, killerid, reason)
{
    new Float:x,Float:y,Float:z;
    if(gTeam[killerid] != gTeam[playerid]) {
GivePlayerMoney(playerid, -500);
      GetPlayerPos(playerid,x,y,z);
cash = CreatePickup(1212,3,x,y,z);
cash2 = CreatePickup(1212,3,x+1,y,z);
cash3 = CreatePickup(1212,3,x-1,y,z);
cash4 = CreatePickup(1212,3,x,y+1,z);
cash5 = CreatePickup(1212,3,x,y-1,z); }
}[/pawn]
Nem lehet valahogy leszûkíteni? mert minden pickupot érzékel ha minden igaz.Beállok egy ház jelbe és mp-nként ad 100 dollárt. :D
Köszönöm a leendõ válaszolóknak a segítséget.

Nem elérhető Sheet

  • 1508
  • Támogató
    • Profil megtekintése
Pickup Money FilterScript Hiba
« Válasz #1 Dátum: 2011. szeptember 03. - 23:23:33 »
0 Show voters
nemértem mi a hiba? mit kellene tenni?

Nem elérhető trave

  • 840
    • Profil megtekintése
Pickup Money FilterScript Hiba
« Válasz #2 Dátum: 2011. szeptember 03. - 23:24:06 »
0 Show voters
Idézetet írta: Sheet date=1315085013\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"11166\" data-ipsquote-contentclass=\"forums_Topic
nemértem mi a hiba? mit kellene tenni?
 
Dettó, én se értem, hogy mi a baj vagy mit szeretnél csinálni vele.

Nem elérhető ►ѕтa

  • 2016
  • Newbie
    • Profil megtekintése
Pickup Money FilterScript Hiba
« Válasz #3 Dátum: 2011. szeptember 03. - 23:44:23 »
0 Show voters
hát igazából fingom sincs nekem se de esetleg így:
[pawn]#include <a_samp>
new cash[MAX_PLAYERS][6];
static gTeam[MAX_PLAYERS];
public OnPlayerPickUpPickup(playerid, pickupid)
{
new i=-1;
if(i < 6)
{
   if(pickupid == cash[playerid])

   {


      GivePlayerMoney(playerid, 100);


   }


}


return 1;


}


       


public OnPlayerDeath(playerid, killerid, reason)


{


if(gTeam[killerid] != gTeam[playerid]) {


   new Float:x, Float:y, Float:z;


   GivePlayerMoney(playerid, -500);


   GetPlayerPos(playerid,x,y,z);


   cash[playerid][


   new i=-1;


   if(i < 6)


   {


      cash[playerid]
= CreatePickup(1212, 3, x+rand(3), x+rand(2), z);

   }


}


return 1;


}[/pawn]

Nem elérhető .:Secur:.

  • 2430
  • GTA Hero
    • Profil megtekintése
Pickup Money FilterScript Hiba
« Válasz #4 Dátum: 2011. szeptember 03. - 23:59:02 »
0 Show voters
Elvileg az nem jó neki, hogy bármélyk pickupba áll bele adja neki a 100$-t, de neki csak 1 bizonyos pickupba kellene, hogy adogassa a 100$-t.
Ezt kérdi, hogy hogyan lehetne megcsinálni?
Leszûkíteni, hogy csak akkor kapjon pénzt ha abba a bizonyos pickupba áll bele pl. groove-on van egy pickup itt szeretné hogy adjon neki 100$, de elmegy lvpd-be és ottis adja neki a pickupba ha beleáll.
Remélem el tudtam magyarázni, ha erre gondolt eggyátalán  :D

Pickup Money FilterScript Hiba
« Válasz #5 Dátum: 2011. szeptember 04. - 08:41:59 »
0 Show voters
Igen ismerem a bugot,ez samp bug, rakd a gamemodeba és jó lesz,legalábbis nekem jó úgy!

Pickup Money FilterScript Hiba
« Válasz #6 Dátum: 2011. szeptember 04. - 09:06:26 »
0 Show voters
Nem csoda hogy találgattok az egész kivitelezésnek nem sok értelme van most minden egyes játékos halálkor létrehozásra kerülnek a pickupok.
 
   cash = CreatePickup(1212,3,x,y,z);
cash2 = CreatePickup(1212,3,x+1,y,z);
cash3 = CreatePickup(1212,3,x-1,y,z);
cash4 = CreatePickup(1212,3,x,y+1,z);
cash5 = CreatePickup(1212,3,x,y-1,z); }
[/quote]
Persze törlés sehol, na mindegy, aztán ott az OnPlayerPickUpPickup ahol minden egyes létrehozott pickuphoz tartozik egy $100 pénz adás akkor mit kell csodálkozni azon hogy akármelyiket veszi fel akkor ad 100 dollárt?
Ez alapján csak az a kérése van hogy grove-ban adja a pénzt, törölni kell az összes többi pickupot csak egyet kell meghagyni.
Írd le érthetõbben mi a b* akarsz, írd le mi is lenne a lényege akkor használhatóbb válaszokat fogsz kapni.

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Pickup Money FilterScript Hiba
« Válasz #7 Dátum: 2011. szeptember 04. - 11:31:09 »
0 Show voters
Ez egy olyan script ami halálkor pénz pickupokat rak le (mint singleben),és ha valaki felveszi akkor kap pénzt és eltûnik a pickup (Mint singleben)
Még nem próbáltam ki hogy a többi része mûködik-e mert kell hozzá egy másik teszter.
Majd megnézem hogy mi lesz ha gamemodba rakom.

Nem elérhető Stray

  • 617
    • Profil megtekintése
Pickup Money FilterScript Hiba
« Válasz #8 Dátum: 2011. szeptember 04. - 13:44:23 »
0 Show voters
De ha valaki felveszi a pickupot utánna törölnöd kell.

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Pickup Money FilterScript Hiba
« Válasz #9 Dátum: 2011. szeptember 04. - 15:09:43 »
0 Show voters
Szóval akkor kell egy deleteobjectes parancs? mert letöltésnél azt írta hogy alapból benne van de tényleg nincs.

Pickup Money FilterScript Hiba
« Válasz #10 Dátum: 2011. szeptember 04. - 15:14:02 »
+1 Show voters
Idézetet írta: tudvari date=1315141783\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"11166\" data-ipsquote-contentclass=\"forums_Topic
Szóval akkor kell egy deleteobjectes parancs? mert letöltésnél azt írta hogy alapból benne van de tényleg nincs.
 
Nem parancs!
Ahogy felveszi a player,törölni kell az objectet,hogy ne spawnoljon újra:
[pawn]DestroyObject(cash);
DestroyPickup(cash2);
DestroyPickup(cash3);
DestroyPickup(cash4);
DestroyPickup(cash5);[/pawn]
Vagyis:
[pawn]public OnPlayerPickUpPickup(playerid, pickupid)
{
new i=-1;
if(i < 6)
{
   if(pickupid == cash[playerid])

   {


      GivePlayerMoney(playerid, 100);


                        DestroyPickup(cash);


                        DestroyPickup(cash2);


                        DestroyPickup(cash3);


                        DestroyPickup(cash4);


                        DestroyPickup(cash5);


   }


}


return 1;


}[/pawn]
« Utoljára szerkesztve: 2011. szeptember 04. - 15:46:46 írta kadaradam »

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Pickup Money FilterScript Hiba
« Válasz #11 Dátum: 2011. szeptember 04. - 15:37:01 »
0 Show voters
Megpróbáltam bemásolni de csa kwarnokat kaptam.Ez a scriptbeli Pickup:
[pawn]
public OnPlayerPickUpPickup(playerid, pickupid)
{
   if(pickupid == cash){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash2){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash3){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash4){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash5){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
        return 1;
}[/pawn]

Pickup Money FilterScript Hiba
« Válasz #12 Dátum: 2011. szeptember 04. - 15:45:01 »
+1 Show voters
Idézetet írta: tudvari date=1315143421\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"11166\" data-ipsquote-contentclass=\"forums_Topic
Megpróbáltam bemásolni de csa kwarnokat kaptam.Ez a scriptbeli Pickup:
[pawn]
public OnPlayerPickUpPickup(playerid, pickupid)
{
   if(pickupid == cash){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash2){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash3){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash4){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
   else if(pickupid == cash5){
   GivePlayerMoney(playerid,100); //this is the money the player gets by harvesting money pickup
}
        return 1;
}[/pawn]
 
[pawn]public OnPlayerPickUpPickup(playerid, pickupid)
{
   if(pickupid == cash){
   GivePlayerMoney(playerid,100);
                DestroyPickup(cash);
}
   else if(pickupid == cash2){
   GivePlayerMoney(playerid,100);;
                DestroyPickup(cash2);
}
   else if(pickupid == cash3){
   GivePlayerMoney(playerid,100);
                DestroyPickup(cash3);
}
   else if(pickupid == cash4){
   GivePlayerMoney(playerid,100);
                DestroyPickup(cash4);
}
   else if(pickupid == cash5){
   GivePlayerMoney(playerid,100);
                DestroyPickup(cash5);
}
        return 1;
}[/pawn]

Nem elérhető tudvari

  • 1264
  • Fejlesztő
    • Profil megtekintése
Pickup Money FilterScript Hiba
« Válasz #13 Dátum: 2011. szeptember 04. - 15:49:44 »
0 Show voters
de sötét vagyok xd kaptam egy warningot mert a 2. giveplayermoney-nél 2 db ; volt. :D
De megoldottam
Köszi
Ment a +1
Beraktam és így amikor a ház pickuphoz megyek igaz nem kapok pénzt érte,de eltûnik a ház.
« Utoljára szerkesztve: 2011. szeptember 04. - 16:08:40 írta tudvari »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal