Setdisabled Weapons
#1

I want to make it so when the Police Enter The Police Building It Doesn't take there weapons away, but when anybody else that is not in the Team_LSPD it does take away all there weapons.


Also How would i define the setdisabledweapons in the script
Reply
#2

Are the teams already Defined?
Reply
#3

yes all the teams are defined. Sorry I meant how to define the setdisabledweapons
Reply
#4

Are you using a /enter for the PD or the yellow arrows?
Reply
#5

no i am using checkpoints


Код:
		new supervisor[256];
			supervisor=dini_Get("/ERP05/Supervisors.txt","EOC");
			SetPlayerVirtualWorld(playerid,2);
			SetPlayerInterior(playerid,10);
			SetPlayerPos(playerid,246.2444,113.7436,1003.2188);
			SetPlayerFacingAngle(playerid,359.0837);
			SetCameraBehindPlayer(playerid);
			SendClientMessage(playerid,COLOR_YELLOW,"(INFO) Welcome to the Los Santos Police Department headquarters.");
			SendClientMessage(playerid,COLOR_GREY,"LSPD East Operations Command.");
           //SendClientMessage(playerid,COLOR_GREY,"Current supervisor: None");
            format(erpstring, sizeof(erpstring), "Current supervisor: %s",supervisor);
			SendClientMessage(playerid, COLOR_GREY, erpstring);
Reply
#6

Just put an if statement, one for police members and one for not police members. Do the exact same thing, but on the one for not police put, ResetPlayerWeapons(playerid);
Reply
#7

sorry could you do an example
Reply
#8

Код:
if(gTeam[playerid] == TEAM_LSPD)
{
Your enter code as it is. 
}

else
{
Your enter code as is.
ResetPlayerWeapons(playerid);
Hope this helped.
Reply
#9

1st (lets call this one team cops) So at the top of your script put:

pawn Код:
new bool: COPS[MAX_PLAYERS];
And lets call the other team robbers

pawn Код:
new bool: ROBBERS[MAX_PLAYERS];
When they join the cop team add this to the code:

pawn Код:
COPS[playerid] = true;
and when they join robbers:
pawn Код:
ROBBERS[playerid] = true;
now that that stuff is added add this for when they enter the checkpoint:

pawn Код:
if(ROBBERS[playerid] == true)
    {
        ResetPlayerWeapons(playerid);
    }
    if(COPS[playerid] == true)
    {
        new string [128];
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, sizeof(pName));
        format(string, sizeof(string), "Welcome back to the PD officer %s", pName);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
That will probably work. Post back and see how it does.
Reply
#10

Thanks I got it problem solved
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)