Pickup lock
#1

Hello, i need help about lock for a player or gang for pickup ( health and armor ). This is the code for the gang.

Код:
 if(gTeam[playerid] != TEAM_xKillaz)
Reply
#2

If i have understand what you mean you can do it:
pawn Код:
if(gTeam[playerid] != TEAM_xKillaz) return 0;
GivePlayerHealt(playerid,100.0);
GivePlayerArmour(playerid,100.0);
Reply
#3

Use OnPlayerPickUpPickup to check for the pickupid and check if they are in team xKillaz then set their stats like said above.
Reply
#4

Quote:
Originally Posted by Galletziz
Посмотреть сообщение
If i have understand what you mean you can do it:
pawn Код:
if(gTeam[playerid] != TEAM_xKillaz){
   GivePlayerHealt(playerid,100.0);
   GivePlayerArmour(playerid,100.0);
}
That's check is for all of the other teams except TEAM_xKillaz:

pawn Код:
if (gTeam[playerid] != TEAM_xKillaz) // Doesn't allow a specific team to use pickup
{
    GivePlayerHealt(playerid,100.0);
    GivePlayerArmour(playerid,100.0);
}
just for a specific team.
Reply
#5

Quote:
Originally Posted by Cypress
Посмотреть сообщение
That's check is for all of the other teams except TEAM_xKillaz, the correct would be:

pawn Код:
if (gTeam[playerid] == TEAM_xKillaz)
{
   GivePlayerHealt(playerid,100.0);
   GivePlayerArmour(playerid,100.0);
}
just for a specific team.
yeah yeah i know, sorry i had not understand, i have edit.
Reply
#6

Thank you very much!
Reply
#7

Quote:
Originally Posted by dundolina
Посмотреть сообщение
Thank you very much!
No problem, but try to study more about pawn, is not a difficult lenguage.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)