Help me with enter/exit
#1

When anywhere clicking F or Enter get me on PDSPAWNULAZ location..


Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if( newkeys == KEY_SECONDARY_ATTACK ) //PDSPAWNULAZ
    {
    if( IsPlayerInRangeOfPoint( playerid, 2.0, 627.2234, -571.8664, 17.9145 ) )
    {
    SetPlayerPos( playerid, 2415.6736,-1695.3650,1016.0280 );
    SetPlayerInterior( playerid, 0 );
    SetTimerEx("ucitavanjeobjekatatd", 50, false, "i", playerid);
    {
    new string[128];
    format(string, sizeof(string), "* %s otvara vrata i ulazi u prostoriju.", GetName(playerid));
    ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    return 1;
    }
    }
    //
    if( newkeys == KEY_SECONDARY_ATTACK ) //PDSPAWNIZLAZ
    {
    if( IsPlayerInRangeOfPoint( playerid, 2.0, 2415.6736, -1695.3650, 1016.0280 ) )
    if(PlayerInfo[playerid][pRuzeostvari] == 0) return
	SendClientMessage(playerid, COLOR_RED, ""COL_BLUE"[POLICAJAC]: "COL_WHITE"Gospodine, ne mozete izaci jer niste uzeli svoje stvari!"), SendClientMessage(playerid, COLOR_RED, ""COL_CYAN"*"COL_GREY"Otidite kod zatvorskih celija i tamo uzmite svoje stvari. /ruzmistvari.");
    {
    SetPlayerPos( playerid, 627.2234,-571.8664,17.9145 );
    SetPlayerInterior( playerid, 0 );
    SetTimerEx("ucitavanjeobjekatatd", 50, false, "i", playerid);
    {
    new string[128];
    format(string, sizeof(string), "* %s otvara vrata i izlazi iz prostorije.", GetName(playerid));
    ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    return 1;
    }
    }
    //
    if( newkeys == KEY_SECONDARY_ATTACK ) //BARSPAWNULAZ
    {
    if( IsPlayerInRangeOfPoint( playerid, 2.0, 681.4557, -473.9840, 16.5363 ) )
    {
    SetPlayerPos( playerid, -456.5717,-278.0141,4021.8850 );
    SetPlayerInterior( playerid, 0 );
    SetTimerEx("ucitavanjeobjekatatd", 50, false, "i", playerid);
    {
    new string[128];
    format(string, sizeof(string), "* %s otvara vrata i ulazi u prostoriju.", GetName(playerid));
    ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    return 1;
    }
    }
    if( newkeys == KEY_SECONDARY_ATTACK ) //BARSPAWNIZLAZ
    {
    if( IsPlayerInRangeOfPoint( playerid, 2.0, -456.5717, -278.0141, 4021.8850 ) )
    {
    SetPlayerPos( playerid, 681.4557,-473.9840,16.5363 );
    SetPlayerInterior( playerid, 0 );
    SetTimerEx("ucitavanjeobjekatatd", 50, false, "i", playerid);
    {
    new string[128];
    format(string, sizeof(string), "* %s otvara vrata i izlazi iz prostorije.", GetName(playerid));
    ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    return 1;
    }
    }
	return 1;
}
Reply


Messages In This Thread
Help me with enter/exit - by TiXz0r - 05.12.2014, 21:22
Re: Help me with enter/exit - by CoaPsyFactor - 05.12.2014, 21:51
Re: Help me with enter/exit - by DaniceMcHarley - 05.12.2014, 22:02
Re: Help me with enter/exit - by TiXz0r - 05.12.2014, 22:14

Forum Jump:


Users browsing this thread: 1 Guest(s)