#1

When i try to enter the Admin house as NoN-admin i get this messanges:


But i only want this to show up when i enter the "Hreen House Icone": You cannot enter, Just for admins!

Can someone fix it?:

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_CRIMSON 0xDC143CAA

#pragma tabsize 0

//Pickup's
new HealthPickup;
new ArmourPickup;
new MinigunPickup;
new GrenadePickup;
//Checkpoints
new EnterHouse, ExitHouse;


public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Admin Headquarter By Larsey123");
    print("-------------------------------------------\n");

    //Pickup
    HealthPickup = CreatePickup(1240, 23, 960.9189453125,2102.4846191406,1011.0274047852); //Health
    ArmourPickup = CreatePickup(1242, 23, 963.43518066406,2102.4033203125,1011.0276489258); //Armour
    MinigunPickup = CreatePickup(362, 23, 958.79949951172,2097.1181640625,1011.0217895508); //Minigun
    GrenadePickup = CreatePickup(342, 23, 932.59777832031,2103.7470703125,1010.4979248047); //Grenade
    //Checkpoints
    EnterHouse = CreatePickup(1273, 23, 966.84710693359,2133.0017089844,10.8203125);
    ExitHouse = CreatePickup(1273, 23, 965.08758544922,-53.164505004883,1001.1245727539);

    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == HealthPickup && IsPlayerAdmin(playerid))
    {
      SetPlayerHealth(playerid, 100);
      SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
      }
      else
      {
      SendClientMessage(playerid, COLOR_GREY, "This Health restore is just for admins!");
      }
//Armour~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == ArmourPickup && IsPlayerAdmin(playerid))
    {
      SetPlayerArmour(playerid, 100);
      SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
      }
      else
      {
      SendClientMessage(playerid, COLOR_GREY, "This Armour restore is just for admins!");
      }
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == MinigunPickup && IsPlayerAdmin(playerid))
    {
      GivePlayerWeapon(playerid, 38, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
      }
      else
      {
      SendClientMessage(playerid, COLOR_GREY, "This Minigun is just for admins!");
      }
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == GrenadePickup && IsPlayerAdmin(playerid))
    {
      GivePlayerWeapon(playerid, 16, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
      }
      else
      {
      SendClientMessage(playerid, COLOR_GREY, "This Grenade is just for admins!");
      }
//EnterHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == EnterHouse){
        if(IsPlayerAdmin(playerid)==1){
            SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572);
            SetPlayerInterior(playerid,  3 );
            SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"You connot enter, Just for admins!");
    }
//ExitHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   if( pickupid == ExitHouse){
        SetPlayerPos(playerid,969.80432128906,2133.1311035156,10.8203);
        SetPlayerInterior(playerid,  0 );
        SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!");
    }
    return 0;
}
Please post the whole script after fix, please
Reply
#2

What u mean exactly?
Reply
#3

Quote:
Originally Posted by zack3021
Посмотреть сообщение
What u mean exactly?
Like this it should be:

1. Go to the "Green House"
2. Then should this show up: You connot enter, Just for admins! (Because i am not logged in as Admin)
3. Done


Like it is now:

1. When i go to the "Green House"
2. Then this shows up: This Health restore is just for Admins!

-----------------------This Armour restore is just for Admins!
-----------------------This Minigun is just for Admins!
-----------------------This Grenade is just for Admins!
3. Done!
Reply
#4

So the picture shows what you want it to be, and not how it is now.
Reply
#5

Quote:
Originally Posted by NotoriousMOB
Посмотреть сообщение
So the picture shows what you want it to be, and not how it is now.
No, The picture is like it is now.
Reply
#6

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_CRIMSON 0xDC143CAA

#pragma tabsize 0

//Pickup's
new HealthPickup;
new ArmourPickup;
new MinigunPickup;
new GrenadePickup;
//Checkpoints
new EnterHouse, ExitHouse;


public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Admin Headquarter By Larsey123");
    print("-------------------------------------------\n");

    //Pickup
    HealthPickup = CreatePickup(1240, 23, 960.9189453125,2102.4846191406,1011.0274047852); //Health
    ArmourPickup = CreatePickup(1242, 23, 963.43518066406,2102.4033203125,1011.0276489258); //Armour
    MinigunPickup = CreatePickup(362, 23, 958.79949951172,2097.1181640625,1011.0217895508); //Minigun
    GrenadePickup = CreatePickup(342, 23, 932.59777832031,2103.7470703125,1010.4979248047); //Grenade
    //Checkpoints
    EnterHouse = CreatePickup(1273, 23, 966.84710693359,2133.0017089844,10.8203125);
    ExitHouse = CreatePickup(1273, 23, 965.08758544922,-53.164505004883,1001.1245727539);

    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == HealthPickup && IsPlayerAdmin(playerid))
    {
      SetPlayerHealth(playerid, 100);
      SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
      }
//Armour~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == ArmourPickup && IsPlayerAdmin(playerid))
    {
      SetPlayerArmour(playerid, 100);
      SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
      }
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == MinigunPickup && IsPlayerAdmin(playerid))
    {
      GivePlayerWeapon(playerid, 38, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
      }
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == GrenadePickup && IsPlayerAdmin(playerid))
    {
      GivePlayerWeapon(playerid, 16, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
      }
//EnterHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == EnterHouse){
        if(IsPlayerAdmin(playerid)==1){
            SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572);
            SetPlayerInterior(playerid,  3 );
            SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"You connot enter, Just for admins!");
    }
//ExitHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   if( pickupid == ExitHouse){
        SetPlayerPos(playerid,969.80432128906,2133.1311035156,10.8203);
        SetPlayerInterior(playerid,  0 );
        SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!");
    }
    return 0;
}
Is that what you wanted?, not completely sure
Reply
#7

Problem solved!

It should look like this:

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_CRIMSON 0xDC143CAA

#pragma tabsize 0

//Pickup's
new HealthPickup;
new ArmourPickup;
new MinigunPickup;
new GrenadePickup;
//Checkpoints
new EnterHouse, ExitHouse;


public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Admin Headquarter By Larsey123");
    print("-------------------------------------------\n");

    //Pickup
    HealthPickup = CreatePickup(1240, 23, 960.9189453125,2102.4846191406,1011.0274047852); //Health
    ArmourPickup = CreatePickup(1242, 23, 963.43518066406,2102.4033203125,1011.0276489258); //Armour
    MinigunPickup = CreatePickup(362, 23, 958.79949951172,2097.1181640625,1011.0217895508); //Minigun
    GrenadePickup = CreatePickup(342, 23, 932.59777832031,2103.7470703125,1010.4979248047); //Grenade
    //Checkpoints
    EnterHouse = CreatePickup(1273, 23, 966.84710693359,2133.0017089844,10.8203125);
    ExitHouse = CreatePickup(1273, 23, 965.08758544922,-53.164505004883,1001.1245727539);

    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
//Health~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == HealthPickup){
        if(IsPlayerAdmin(playerid)==1){
      SetPlayerHealth(playerid, 100);
      SendClientMessage(playerid,COLOR_ORANGERED,"You picked up Health!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Health for admin, ONLY!");
    }
//Armour~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == ArmourPickup){
        if(IsPlayerAdmin(playerid)==1){
      SetPlayerArmour(playerid, 100);
      SendClientMessage(playerid,COLOR_GREY,"You picked up Armour!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Armour for admin, ONLY!");
    }
//Minigun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == MinigunPickup){
        if(IsPlayerAdmin(playerid)==1){
      GivePlayerWeapon(playerid, 38, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Minigun!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Minigun for admin, ONLY!");
    }
//Grenade~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == GrenadePickup){
        if(IsPlayerAdmin(playerid)==1){
      GivePlayerWeapon(playerid, 16, 99999);
      SendClientMessage(playerid,COLOR_CRIMSON,"You picked up a Grenade!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"Greande for admin, ONLY!");
    }
//EnterHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( pickupid == EnterHouse){
        if(IsPlayerAdmin(playerid)==1){
            SetPlayerPos(playerid,963.37561035156,-53.307209014893,1001.124572);
            SetPlayerInterior(playerid,  3 );
            SendClientMessage(playerid,COLOR_CRIMSON,"Welcome to the Admin House!");
        }
        else return SendClientMessage(playerid,COLOR_CRIMSON,"You connot enter, Just for admins!");
    }
//ExitHouse~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   if( pickupid == ExitHouse){
        SetPlayerPos(playerid,969.80432128906,2133.1311035156,10.8203);
        SetPlayerInterior(playerid,  0 );
        SendClientMessage(playerid,COLOR_CRIMSON,"You have left the Admin House!");
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)