[Question] Pickup if
#1

The factions are this way:

#define PD 1
#define BOMB 2
#define GOB 3

How would you make the "BOMB" faction if you can enter but the others do not?

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    new 
facID PlayerInfo[playerid][pFaction];
    if(
pickupid == InteriorPolicia)
    {
    if(
FactionInfo[facID][fType] == PD) return SendClientMessage(playerid,0xff0066ff,"You are not of the faction.");
    new 
PlayerLogeado[MAX_PLAYERS]; //User without faction.
    
if(PlayerLogeado[playerid] == 0) return SendClientMessage(playerid,0xff0066ff,"You are not of the faction.");
    
SetPlayerPos(playerid,1565.3247,-1671.1831,20.6039); // X,Y,Z 
    
}
    return 
1;

Reply
#2

Still not sure what you meant, You want to make BOMB faction?
Reply
#3

Quote:
Originally Posted by Bingo
Посмотреть сообщение
Still not sure what you meant, You want to make BOMB faction?
I want the "BOMB" faction to enter the HQ, but I get the message "You are not of the faction"
Reply
#4

pawn Код:
if(FactionInfo[facID][fType] == PD) return SendClientMessage(playerid,0xff0066ff,"You are not of the faction.");
Here you're checking that if the player is in faction PD not BOMB.

pawn Код:
if(FactionInfo[facID][fType] == BOMB) return SendClientMessage(playerid,0xff0066ff,"You are not of the faction.");
Now this is for BOMB, If he/she is in faction BOMB then he can enter.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)