Pickup problems
#1

Hello guys, I've a simple question, how for gods sake can I make a pickup stop looping, I mean I am using pickup which leads to a dialog, and even tho' I close the dialog, it repeats itself after 1 millisecond and basically blocks the movement lol, is it something with the pickup type, or some loop problem? Anyways, thanks ahead for the answer.
Reply
#2

TogglePlayerControllable(playerid, 1);
Reply
#3

Give us a code!
Reply
#4

Quote:
Originally Posted by Dana_scully
Посмотреть сообщение
TogglePlayerControllable(playerid, 1);
I do not understand, will that stop the pickup from looping over itself? Since it just freezes my cahracter, doesn't make the pickup stable.

Quote:
Originally Posted by =KempeR=
Посмотреть сообщение
Give us a code!
What for? I am just asking if there's a way to stop it.
P.S. - It's a pickup which leads to a dialog which leads to ondialogresponse, a simple weapon menu, nothing special.
Reply
#5

I not think its possible to stop the pickups keep looping because its a source of san andreas...
Reply
#6

pawn Код:
// global
new
    bool: In_Pickup[ MAX_PLAYERS ]
;

// OnPlayerConnect
In_Pickup[ playerid ] = false;

// Where you want it to stop showing all the time.
if( IsPlayerInRangeOfPoint( playerid, 1.0, X, Y, Z ) ) // CHANGE THE COORDINATES
{
    if( !In_Pickup[ playerid ] )
    {
        In_Pickup[ playerid ] = true;
        ShowPlayerDialog( ... );
    }
}
else
{
    if( In_Pickup[ playerid ] ) In_Pickup[ playerid ] = false;
}
Reply
#7

What I use is, VARIABLES! PROBABLY EASIEST THING IN PAWNO!

pawn Код:
new Used1[MAX_PLAYERS];

public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    //==============================Banks=====================================//
    if(pickupid == BankEnt1)
       {  
           if(Used1[playerid] == 0)
          {
               SHOW DIALOG
               Used1[playerid] =1;
          }
       return 1;
    }
}

//The on player close dialog, make a timer so it sets Used1 to zero.
That's a simple solution
Reply
#8

Quote:
Originally Posted by Vanter
Посмотреть сообщение
What I use is, VARIABLES! PROBABLY EASIEST THING IN PAWNO!

pawn Код:
new Used1[MAX_PLAYERS];

public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    //==============================Banks=====================================//
    if(pickupid == BankEnt1)
       {  
           if(Used1[playerid] == 0)
          {
               SHOW DIALOG
               Used1[playerid] =1;
          }
       return 1;
    }
}

//The on player close dialog, make a timer so it sets Used1 to zero.
That's a simple solution
I've did it, but I didn't get the timer stuff, I mean it works fine and no loops or shit like that, but once I enter a pickup, it stops working after that..
Reply
#9

Use the Konstantinos one
Reply
#10

because you didn't make atimer
here it is
pawn Код:
SetPVarInt(playerid, "DoorTimer", SetTimerEx("DOOR", 5000, 1, "i", playerid)); //5seconds timer

forward DOOR(playerid);
public DOOR(playerid)
{
    Used1[playerid] =0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)