Jump to content
  • 0

pomoc Tak nechápu kde je chyba


FireChief

Dotaz

#include <zcmd>

 

#define FILTERSCRIPT

 

new police;

 

public OnGameModeInit()

{

        police = CreatePickup(1318, 1, 1275.0013,-1662.6216,19.7344, -1);

        return 1;

}

 

public OnPlayerPickUpPickup(playerid, pickupid)

{

        if(pickupid == police)

        {

            GameTextForPlayer(playerid, "Type /enter",3000,6);

        }

        return 1;

}

 

CMD:enter(playerid, params[])

{

        if(IsPlayerInRangeOfPoint(playerid, 5, 1275.0013,-1662.6216,19.7344, -1))

        SetPlayerPos(playerid, 1474.0437,-1751.1372,3285.2859);

        SetPlayerInterior(playerid, 5);

        return 1;

}

 

CMD:exit(playerid, params[])

{

        if(IsPlayerInRangeOfPoint(playerid, 5, 1474.0437,-1751.1372,3285.2859)) //

        SetPlayerPos(playerid, 1275.0013,-1662.6216,19.7344);

        SetPlayerInterior(playerid, 0);

        return 1;

}

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Globální moderátor

Vo funkcii IsPlayerInRangeOfPoint to čo je to -1 na konci....

IsPlayerInRangeOfPoint(playerid,range,x,y,z);

 

//Edit aha napísal som to neskôr ako si to editol že je to vyriešené :d

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...