Pickup help
#1

How i can create pickup and when i go to the pickup and press SCROLL ( KEY_LOOK_BEHIND) to setplayerpos somewhere
Reply
#2

Use OnPlayerPickUpPickup/IsPlayerInRangeOfPoint + GetPlayerKeys
Reply
#3

but when i make it on public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

i have this error error : error 030: compound statement not closed at the end of file (started at line 481)

PHP код:
[PHP]if(newkeys KEY_LOOK_BEHIND)
    {
        if(
IsPlayerInRangeOfPoint(playerid2.01434.90002441,-1456.40002441,20.60000038))
         {
        if(
pickupid == pickup55)
    {
    
SetPlayerInterior(playerid7);
    
SetPlayerPos(playerid,302.292877,-143.139099,1004.062500);
        return 
1;
        }
     return 
1;

[/PHP]
Reply
#4

AAAA WTF ?!

Why You open two "{" and closing three ?
and why two are three "return 1;" ?
Reply
#5

pawn Код:
if(newkeys & KEY_LOOK_BEHIND)
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 1434.90002441,-1456.40002441,20.60000038))
    {
        SetPlayerInterior(playerid, 7);
        SetPlayerPos(playerid,302.292877,-143.139099,1004.062500);
    }
    return 1;
}
Reply
#6

again error 030: compound statement not closed at the end of file (started at line 481)
Reply
#7

how look you line 481 ?
Reply
#8

PHP код:
new PickupTest
public 
OnGameModeInIt()
 {
PickupTest CreatePickup(1239232044.2612,-1487.2828,10.8281, -1); 
return 
1;
    }
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == PickupTest
                 
SetPlayerPos(playerid1723.0146,-1878.4855,13.5646);
                 
SetPlayerFacingAngle(playerid359.2945);
         return 
1;
    }
    return 
1;

How i can make this to enter with SCROLL
Reply
#9

Replace
pawn Код:
public OnGameModeInit()
{
    PickupTest = CreatePickup(1239, 23, 2044.2612,-1487.2828,10.8281, -1);
    return true;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == PickupTest)
    {
        SetPlayerPos(playerid, 1723.0146,-1878.4855,13.5646);
        SetPlayerFacingAngle(playerid, 359.2945);
    }
    return true;
}
Reply
#10

yes but i wont when i press SCROLL to
SetPlayerPos(playerid, 1723.0146,-1878.4855,13.5646);
SetPlayerFacingAngle(playerid, 359.2945);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)