[Question] Please Help :)
#1

Код:
CreatePickup(1239, 1, 1460.6573,-1010.5208,26.8438, -1);//Bank
I want to know how to set an id to each of my pickups so then I can set gamemodetext to each seperately. So can someone show me how to add and id to each please? thanks
Reply
#2

pawn Код:
new Pickup1;
//add new Pickup2; if your gonna create another pickup
pawn Код:
Pickup1 = CreatePickup(1239, 1, 1460.6573,-1010.5208,26.8438, -1);//Bank
//Pickup2 = CreatePickup
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
      if(pickupid == Pickup1)
      {
            //codes
      }
      //the same for pickup2 and other pickup
      return 1;
}
Reply
#3

Quote:
Originally Posted by MasterJoker
Посмотреть сообщение
pawn Код:
new Pickup1;
//add new Pickup2; if your gonna create another pickup
pawn Код:
Pickup1 = CreatePickup(1239, 1, 1460.6573,-1010.5208,26.8438, -1);//Bank
//Pickup2 = CreatePickup
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
      if(pickupid == Pickup1)
      {
            //codes
      }
      //the same for pickup2 and other pickup
      return 1;
}
Thanks Again Man. +1 Rep
Reply
#4

Do I just do it like this? (Under Gamemodeinit)
Код:
new Pickup1;
	Pickup1 = CreatePickup(1239, 1, 1460.6573,-1010.5208,26.8438, -1);//Bank
Or where do I put the
Код:
new Pickup1; //??
Reply
#5

put new Pickup1;

at the top of script (After #include <a_samp> or any #include>
Reply
#6

My Code:
Код:
#include <a_samp>
new Pickup1;
Код:
Pickup1 = CreatePickup(1239, 1, 1460.6573,-1010.5208,26.8438, -1);//Bank
Errors:
Код:
D:\khubb2\Desktop\SAMP\Blank Server\gamemodes\PROJECT.pwn(73) : warning 204: symbol is assigned a value that is never used: "Pickup1"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Dunno what I've done wrong.
Reply
#7

make sure you use pickup1 onplayerpickuppickup
Reply
#8

Hey the first one works, then I tried to add a second one and it doesn't compile. Anything wrong with this code?

Code:
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
      if(pickupid == Pickup1)
      {
      SetGameModeText("Bank Of Los Santos");
      }
      if(pickupid == Pickup2)
      {
      SetGameModeText("Out Of Business");
	  return 1;
}
Reply
#9

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
      if(pickupid == Pickup1)
      {
          SetGameModeText("Bank Of Los Santos");
      }
      if(pickupid == Pickup2)
      {
          SetGameModeText("Out Of Business");
      } //was missing
      return 1;
}
Reply
#10

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
      if(pickupid == Pickup1)
      {
          SetGameModeText("Bank Of Los Santos");
      }
      if(pickupid == Pickup2)
      {
          SetGameModeText("Out Of Business");
      } //was missing
      return 1;
}
Thanks, atleast you can explain it. I'm a bit noobish with this coding shit. So if you don't want to be asked questions on what I have to do next, Don't Post Here!

-Thanks Man For Your Help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)