If player is in range and if player in faction
#1

How do i do it so that they have to be in the faction and be in range of point ?

pawn Код:
if( !strcmp(cmdtext,"/cctv1",true ))
    {
        if (IsPlayerInRangeOfPoint(playerid, 3, 2250.8818,2489.7144,10.9908))
if(PlayerInfo[playerid][pFaction] != FACTION_LVPD) return SystemMsg(playerid, "You are not a member of LVPD! Or not range of the cctv station!");
        {
            SetPlayerCameraPos(playerid, 2105.4431,2163.4868,15.9372);
            SetPlayerCameraLookAt(playerid, 2125.3391,2124.7417,10.6719);
            TogglePlayerControllable(playerid,0);
            SendClientMessage (playerid, COLOR_GREEN, "The Strip CCTV #1");
        }
        return 1;
    }
Reply
#2

pawn Код:
if( !strcmp(cmdtext,"/cctv1",true ))
    {
        if(PlayerInfo[playerid][pFaction] = FACTION_LVPD)
        {
        if (IsPlayerInRangeOfPoint(playerid, 3, 2250.8818,2489.7144,10.9908))
        {
            SetPlayerCameraPos(playerid, 2105.4431,2163.4868,15.9372);
            SetPlayerCameraLookAt(playerid, 2125.3391,2124.7417,10.6719);
            TogglePlayerControllable(playerid,0);
            SendClientMessage (playerid, COLOR_GREEN, "The Strip CCTV #1");
        }
        else
        {
            SystemMsg(playerid, "You are not a member of LVPD! Or not range of the cctv station!");
        }
        return 1;
    }
Reply
#3

Thank you
Reply
#4

pawn Код:
if(!strcmp(cmdtext,"/cctv1",true ))
{
    if(PlayerInfo[playerid][pFaction] != FACTION_LVPD) return SystemMsg(playerid, "You are not a member of LVPD! Or not range of the cctv station!");
    if(IsPlayerInRangeOfPoint(playerid, 3, 2250.8818,2489.7144,10.9908))
    {
        SetPlayerCameraPos(playerid, 2105.4431,2163.4868,15.9372);
        SetPlayerCameraLookAt(playerid, 2125.3391,2124.7417,10.6719);
        TogglePlayerControllable(playerid,0);
        SendClientMessage (playerid, COLOR_GREEN, "The Strip CCTV #1");
    }
    return 1;
}
Reply
#5

pawn Код:
if(PlayerInfo[playerid][pFaction] != FACTION_LVPD) return SystemMsg(playerid, "You are not a member of LVPD! Or not range of the cctv station!");
Move "Or not range of the cctv station!"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)