SA-MP Forums Archive
[Question] Pickup if - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Question] Pickup if (/showthread.php?tid=642228)



[Question] Pickup if - CDGlock - 26.09.2017

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;




Re: [Question] Pickup if - Bingo - 26.09.2017

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


Re: [Question] Pickup if - CDGlock - 26.09.2017

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"


Re: [Question] Pickup if - Bingo - 26.09.2017

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.