Picks up (pickup) from long distance
#1

Hi
How need make script like this, if pickup is a long distance away he will take it. Anyway it should look like this, if anyone dead this code should take that pickup and get like for example 5 score and when he took that pickup that pickup is destroyed. Its like magnet
Reply
#2

PHP код:
new pickup;

public 
OnGameModeInit()
{
     
pickup CreatePickup(model11503.33591432.358510.1191, -1);
     return 
1;
}

public 
OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == pickup)
    {
        
// do what you want
        
DestroyPickup(pickup);
    }
    return 
1;

Something like that should work.
Reply
#3

Quote:
Originally Posted by Private200
Посмотреть сообщение
PHP код:
new pickup;
public 
OnGameModeInit()
{
     
pickup CreatePickup(model11503.33591432.358510.1191, -1);
     return 
1;
}
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == pickup)
    {
        
// do what you want
        
DestroyPickup(pickup);
    }
    return 
1;

Something like that should work.
I mean not how to create i talking about how need make take pickups around me from long distance and get score from it. With your code i need walk into pickup and then get something i need take it from long distance
Reply
#4

Quote:
Originally Posted by Pokemon64
Посмотреть сообщение
I mean not how to create i talking about how need make take pickups around me from long distance and get score from it. With your code i need walk into pickup and then get something i need take it from long distance
You can create Dynamic Checkpoints or even define Areas with IsPlayerInArea
Reply
#5

Quote:
Originally Posted by Flamehaze7
Посмотреть сообщение
You can create Dynamic Checkpoints or even define Areas with IsPlayerInArea
Example?
Reply
#6

Код:
 OnPlayerEnterDynamicArea
     {
       if(IsPlayerInRangeOfPoint(playerid,range, x ,y ,z) 
          {
             Give player score and delete the pickup 
           }
       }
Im really sorry cuz ive phone worten this thing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)