(Help) SAPD door only to -
NTVbeleza - 14.03.2014
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
Re: (Help) SAPD door only to -
Flake. - 14.03.2014
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
Re: (Help) SAPD door only to -
NTVbeleza - 15.03.2014
Quote:
Originally Posted by (*|Flake|*)
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?
Re: (Help) SAPD door only to -
NTVbeleza - 16.03.2014
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.
Re: (Help) SAPD door only to -
BroZeus - 16.03.2014
can u give the coords of place where you want to create that sliding door
Re: (Help) SAPD door only to -
NTVbeleza - 16.03.2014
Quote:
Originally Posted by BroZeus
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;
}
Re: (Help) SAPD door only to -
BroZeus - 16.03.2014
that are not the coords for SFPD give me the coords from where your player is supossed to enter the sfpd
Re: (Help) SAPD door only to -
NTVbeleza - 16.03.2014
Solved
Re: (Help) SAPD door only to -
Lloyde - 16.03.2014
Ahahahaha