[Help]Pickup Subject
#1

I Need help for Cash Pickups(ID 1212)I Did:
CreatePickup(1212, 2, 1465.2239, -1143.3992, 25.132;
CreatePickup(1212, 2, 1689.9711, -1148.1064, 24.0005);
CreatePickup(1212, 2, 1725.2666, -1271.5396, 14.6782);
CreatePickup(1212, 2, 1621.7953, -1200.9562, 20.5216);
In OnGameModeInIt and then i added this script to make all these give 15$ bucks for each pickup.
Code:if(pickupid==1212)GivePlayerMoney(playerid,15 ); and when i pick the money up i dont get the 15 Bucks...
Help PLease? :P
Reply
#2

pawn Code:
new pickup;

public OnGameModeInit()
{
  pickup = CreatePickup();
}

public OnPlayerPickUpPickup()
{
  if(pickupid==pickup)GivePlayerMoney(playerid,15);
}
Reply
#3

What is the new PickUp Thing above the OnGameModeInIt?
Reply
#4

I Need a better explanation cause im new and im weak in the subject of scripting =/
Reply
#5

Quote:
Originally Posted by Danikov
I Need a better explanation cause im new and im weak in the subject of scripting =/
pawn Code:
//below #include <a_samp>
new Cash
new Cash1
new Cash2
new Cash3

public OnGamemodeInit();
{
Cash = CreatePickup(1212, 2, 1465.2239, -1143.3992, 25.1328);
Cash1 = CreatePickup(1212, 2, 1689.9711, -1148.1064, 24.0005);
Cash2 = CreatePickup(1212, 2, 1725.2666, -1271.5396, 14.6782);
Cash3 = CreatePickup(1212, 2, 1621.7953, -1200.9562, 20.5216);
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid);
{
if(pickupid==Cash)GivePlayerMoney(playerid,15);
if(pickupid==Cash1)GivePlayerMoney(playerid,15);
if(pickupid==Cash2)GivePlayerMoney(playerid,15);
if(pickupid==Cash3)GivePlayerMoney(playerid,15);
}
Give that a try. (Note: You need to indent that.)
Reply
#6

i did blow the #include <a_samp> but once i compile i get this
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(3) : error 001: expected token: ";", but found "new"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(4) : error 001: expected token: ";", but found "new"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(5) : error 001: expected token: ";", but found "new"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(27) : error 001: expected token: ";", but found "-identifier-"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(249) : warning 203: symbol is never used: "Cash"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(249) : warning 203: symbol is never used: "Cash1"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(249) : warning 203: symbol is never used: "Cash2"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(249) : warning 203: symbol is never used: "Cash3"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#7

pawn Code:
new Cash;
new Cash1;
new Cash2;
new Cash3;
Reply
#8

I Get now warnings no errors.
Compiling Result:
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(100) : warning 204: symbol is assigned a value that is never used: "Cash"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(101) : warning 204: symbol is assigned a value that is never used: "Cash1"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(102) : warning 204: symbol is assigned a value that is never used: "Cash2"
D:\Documents and Settings\victor\Desktop\SAMP Server\pawno\test.pwn(103) : warning 204: symbol is assigned a value that is never used: "Cash3"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Warnings.
Reply
#9

Thanks Alot I Just forgot to add something but it works Thanks Vortex and FireFox !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)