when someone picksup a pickup it gives him money but he can pick it again. i want it to not be available to the one who has picked it. also i want the pickup to respawn
Show us the code.
if (pickup.Model == 356)
{
player.Cash += 1000;
MessagePlayer("You've Found The Treasure!", player);
Pickup.Remove;
}
}
here
Maybe Use That pickup.RespawnTime = 999999999999999;
Quote from: {ultimatejugo] on Feb 19, 2016, 05:01 AMif (pickup.Model == 356)
{
player.Cash += 1000;
MessagePlayer("You've Found The Treasure!", player);
Pickup.Remove;
}
}
here
Remove is a function I guess, so use: pickup.Remove()
Quote from: KAKAN on Feb 19, 2016, 05:49 AMQuote from: {ultimatejugo] on Feb 19, 2016, 05:01 AMif (pickup.Model == 356)
{
player.Cash += 1000;
MessagePlayer("You've Found The Treasure!", player);
Pickup.Remove;
}
}
here
Remove is a function I guess, so use: pickup.Remove()
thats the thing the pickup doesnt get removed
Quote from: KAKAN on Feb 19, 2016, 05:49 AMRemove is a function I guess, so use: pickup.Remove()
Its pickup.Remove(); @kakan :P
you forgot to add " ; "
ultimatejugo try like this, pickup.Remove();
Pickup.Remove();
pickup.Remove(); // Since squirrel is a case sensitive language, or try pickup.RespawnTime = 5000;
// Time in milliseconds.
Quote from: Woodland on Feb 19, 2016, 06:47 AMQuote from: KAKAN on Feb 19, 2016, 05:49 AMRemove is a function I guess, so use: pickup.Remove()
Its pickup.Remove(); @kakan :P
you forgot to add " ; "
ultimatejugo try like this, pickup.Remove();
Quote from: Xmair on Feb 19, 2016, 06:51 AMPickup.Remove();
pickup.Remove(); // Since squirrel is a case sensitive language, or try pickup.RespawnTime = 5000;
// Time in milliseconds.
Well, the thing, semicolon( ';' ) is not needed. I have many things without ';' and they work.
@Xmair, I did the same.
Quote from: {ultimateretard on Feb 19, 2016, 06:44 AMQuote from: KAKAN on Feb 19, 2016, 05:49 AMRemove is a function I guess, so use: pickup.Remove()
thats the thing the pickup doesnt get removed
Well, you use the function as a variable, then how do you expect it to work, huh?
Well, this is the code, use it, or get rekt.
if (pickup.Model == 356)
{
player.Cash += 1000;
MessagePlayer("You've Found The SHITTY Treasure!", player);
Pickup.Remove();
}
Quote from: KAKAN on Feb 19, 2016, 08:05 AMQuote from: Woodland on Feb 19, 2016, 06:47 AMQuote from: KAKAN on Feb 19, 2016, 05:49 AMRemove is a function I guess, so use: pickup.Remove()
Its pickup.Remove(); @kakan :P
you forgot to add " ; "
ultimatejugo try like this, pickup.Remove();
Quote from: Xmair on Feb 19, 2016, 06:51 AMPickup.Remove();
pickup.Remove(); // Since squirrel is a case sensitive language, or try pickup.RespawnTime = 5000;
// Time in milliseconds.
Well, the thing, semicolon( ';' ) is not needed. I have many things without ';' and they work. @Xmair, I did the same.
Quote from: {ultimateretard on Feb 19, 2016, 06:44 AMQuote from: KAKAN on Feb 19, 2016, 05:49 AMRemove is a function I guess, so use: pickup.Remove()
thats the thing the pickup doesnt get removed
Well, you use the function as a variable, then how do you expect it to work, huh?
Well, this is the code, use it, or get rekt.
if (pickup.Model == 356)
{
player.Cash += 1000;
MessagePlayer("You've Found The SHITTY Treasure!", player);
Pickup.Remove();
}
:( Kakan, why wrong?
Pickup.Remove
doesn't even exist :|
Ultimate change
Pickup.Remove();
to
pickup.Remove();
like this
if (pickup.Model == 356)
{
player.Cash += 1000;
MessagePlayer("You've Found The Treasure!", player);
pickup.Remove();
}
}
since you didn't even defined Pickup*
P.S : - in simple word, P isn't defined anywhere.
Yeah it could be
local Pickup = FindPickup( pickup.ID );
then we can say
Pickup.Remove();
is still kinda correct.