(Help) SAPD door only to
#1

Help create a blocker normal inputs,
hi i want the cops SAPD I have a closed door inside LSPD but to put / enter only let them go to other users as I do?

like a normal door of a shop but here only the SAPD can enter the use / enter

if a user puts / enter you notice you out "Not a cop"



no sliding doors
Reply
#2

pawn Code:
new DoorPickup; //Defining the DoorPickup globaly
DoorPickup = CreatePickup(1274, 2, 0.0, 0.0, 9.0); //Making the door pickup (Change this to your ENTRY point)

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == DoorPickup) //Making sure that the player is in the pickup for the door
    {
        if(pInfo[playerid][pSAPD] >= 1) //Checking if the player is in SAPD (Change for your script)
        {
            SetPlayerPos(playerid, x, y, z); //Set this to where it will TP the player on entry
            SendClientMessage(playerid, -1, "Hello Mr. Police man"); //The message the player will get if they can enter
        }
    }
    else SendClientMessage(playerid, -1, "You're not a cop"); //The messag ethe player will get if they're NOT a cop
    return 1;
}
Not tested how ever you should get the idea of how it works and be able to edit it for your gamemode
Reply
#3

Quote:
Originally Posted by (*|Flake|*)
View Post
pawn Code:
new DoorPickup; //Defining the DoorPickup globaly
DoorPickup = CreatePickup(1274, 2, 0.0, 0.0, 9.0); //Making the door pickup (Change this to your ENTRY point)

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == DoorPickup) //Making sure that the player is in the pickup for the door
    {
        if(pInfo[playerid][pSAPD] >= 1) //Checking if the player is in SAPD (Change for your script)
        {
            SetPlayerPos(playerid, x, y, z); //Set this to where it will TP the player on entry
            SendClientMessage(playerid, -1, "Hello Mr. Police man"); //The message the player will get if they can enter
        }
    }
    else SendClientMessage(playerid, -1, "You're not a cop"); //The messag ethe player will get if they're NOT a cop
    return 1;
}
Not tested how ever you should get the idea of how it works and be able to edit it for your gamemode
where they are the first lines?
Reply
#4

C:\Users\NTVbeleza\Desktop\bel.pwn(50037) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
C:\Users\NTVbeleza\Desktop\bel.pwn(50037) : warning 215: expression has no effect
C:\Users\NTVbeleza\Desktop\bel.pwn(50037) : error 001: expected token: ";", but found "]"
C:\Users\NTVbeleza\Desktop\bel.pwn(50037) : error 029: invalid expression, assumed zero
C:\Users\NTVbeleza\Desktop\bel.pwn(50037) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#5

can u give the coords of place where you want to create that sliding door
Reply
#6

Quote:
Originally Posted by BroZeus
View Post
can u give the coords of place where you want to create that sliding door
Code:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == DoorPickup) //Making sure that the player is in the pickup for the door
    {
        if(pInfo[playerid][pSFPD; >= 1) //Checking if the player is in SAPD (Change for your script)
        {
            SetPlayerPos(playerid, 276.1867,122.1338,1004.6172,269.0974); //Set this to where it will TP the player on entry
            SendClientMessage(playerid, -1, "Hello Mr. Police man"); //The message the player will get if they can enter
        }
    }
    else SendClientMessage(playerid, -1, "You're not a cop"); //The messag ethe player will get if they're NOT a cop
    return 1;
}
Reply
#7

that are not the coords for SFPD give me the coords from where your player is supossed to enter the sfpd
Reply
#8

Solved
Reply
#9

Ahahahaha
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)