2 problems -
Taz86 - 05.04.2009
Hey all!
I got two problems, I need help!
First I ad up this cmd under all the cars lines in GM, but when i log i cant enter them, says i dont have the keys.
Why?
One of them like here:
Код:
AddPlayerClass(120,731.6451,-1276.1884,13.5666); //
Second.
I have this line sript for gun pickup, but i want to do it but in other place, so i did it liek this
At start
Код:
new Pickupwep2
new pickupwep
Than under
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
I did this
Код:
if(pickupid == pickupwep)
{
GivePlayerWeapon(playerid, 347, 790);
}// First one
if(pickupid == pickupwep2)
{
GivePlayerWeapon(playerid, 347, 790);
}
This gives me error.
error 010: invalid function or declaration
warning 204: symbol is assigned a value that is never used: "pickupwep2"
What to do?
I also create at the line:
Код:
public OnGameModeInit()
Код:
pickupwep2 = CreatePickup(347, 2, 1270.1304,-795.5559,1084.0078);
pickupwep = CreatePickup(347, 2, -2671.0459,1429.3628,906.4609);// First one
The first one works fine, the 2 no, Help me please!
Thanks alot!
Re: 2 problems -
Torekk - 05.04.2009
Well, your first problem is simple:
pawn Код:
AddPlayerClass(120,731.6451,-1276.1884,13.5666); //
You forgot a few parameters, like the starting money or weapons of the player, even if you don't want to use them. Use this instead:
pawn Код:
AddPlayerClass(120,731.6451,-1276.1884,13.5666,0,0,0,0,0,0); //
For the second problem, well I think it's this:
You made the first character capital, but then never used it like that, just change that line to:
Re: 2 problems -
Taz86 - 05.04.2009
SSo sec, Expline me please.
Where do I need to put the code you gave me?
To replace the line I showed you?
Or where?
And the second problem, Now in the Script its little "p" Now a P, i made mistake,
So thanks for help , but expline me more please.
Re: 2 problems -
Taz86 - 05.04.2009
Quote:
Originally Posted by Torekk
Well, your first problem is simple:
pawn Код:
AddPlayerClass(120,731.6451,-1276.1884,13.5666); //
You forgot a few parameters, like the starting money or weapons of the player, even if you don't want to use them. Use this instead:
pawn Код:
AddPlayerClass(120,731.6451,-1276.1884,13.5666,0,0,0,0,0,0); //
For the second problem, well I think it's this: You made the first character capital, but then never used it like that, just change that line to:
|
Ops!!
Man I wirte it not good, In the script, the line for the cars look like this one here:
Код:
AddStaticVehicle(409,1533.2556,-893.8984,60.9226,45.9739,0,1); //
So now this works fine, but i cant get in the car....
Re: 2 problems -
Taz86 - 05.04.2009
Please help me, No one helps, I make reply for this, and guys u the best here, what is this problems for you!?
So please guys!
Help
I beg....
Re: 2 problems -
[M2S]moe - 05.04.2009
What gamemode are you using? Public Enemy?
Re: 2 problems -
Taz86 - 05.04.2009
Nope, I use, Los Angeles RP.
Re: 2 problems -
[M2S]moe - 05.04.2009
ok, first your pickup problem. You need to CREATE the pickups, and assign the variable to those pickups so you later identify them under OnPLayerPickupPickup.
So add OnGameModeInIt your pickups like this:
pickupwep = CreatePickup(blahblahblah);
pickupwep2 = CreatePickup(blahblahblah);
Second, you're using a RP script which tells you you need the keys to drive a car. So I suggest you figure out how to buy the car or get the keys ingame as your script was probably made this way for a reason. Otherwise search for SetVehicleParamsForPlayer which is the function used to lock cars.
Re: 2 problems -
Taz86 - 05.04.2009
Quote:
Originally Posted by [M2S
moe ]
ok, first your pickup problem. You need to CREATE the pickups, and assign the variable to those pickups so you later identify them under OnPLayerPickupPickup.
So add OnGameModeInIt your pickups like this:
pickupwep = CreatePickup(blahblahblah);
pickupwep2 = CreatePickup(blahblahblah);
Second, you're using a RP script which tells you you need the keys to drive a car. So I suggest you figure out how to buy the car or get the keys ingame as your script was probably made this way for a reason. Otherwise search for SetVehicleParamsForPlayer which is the function used to lock cars.
|
I did, Says:
error 021: symbol already defined: "OnPlayerPickUpPickup"
Re: 2 problems -
[M2S]moe - 05.04.2009
which means you have 2 callbacks OnPlayerPickupPickup. Search and delete the one you dont need?