[Question] Please Help :) -
KiiD - 04.02.2012
Код:
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
Re: [Question] Please Help :) -
MasterJoker - 04.02.2012
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;
}
Re: [Question] Please Help :) -
KiiD - 04.02.2012
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
Re: [Question] Please Help :) -
KiiD - 04.02.2012
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
Re: [Question] Please Help :) -
MasterJoker - 04.02.2012
put new Pickup1;
at the top of script (After #include <a_samp> or any #include>
Re: [Question] Please Help :) -
KiiD - 04.02.2012
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.
Re: [Question] Please Help :) -
MasterJoker - 04.02.2012
make sure you use pickup1 onplayerpickuppickup
Re: [Question] Please Help :) -
KiiD - 04.02.2012
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;
}
Re: [Question] Please Help :) -
[XST]O_x - 04.02.2012
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Pickup1)
{
SetGameModeText("Bank Of Los Santos");
}
if(pickupid == Pickup2)
{
SetGameModeText("Out Of Business");
} //was missing
return 1;
}
Re: [Question] Please Help :) -
KiiD - 04.02.2012
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