Pickup lock - 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: Pickup lock (
/showthread.php?tid=548859)
Pickup lock -
dundolina - 02.12.2014
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)
Re: Pickup lock -
Galletziz - 02.12.2014
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);
Re: Pickup lock -
Larceny - 02.12.2014
Use
OnPlayerPickUpPickup to check for the pickupid and check if they are in team xKillaz then set their stats like said above.
Re: Pickup lock -
Cypress - 02.12.2014
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.
Re: Pickup lock -
Galletziz - 02.12.2014
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.
Re: Pickup lock -
dundolina - 03.12.2014
Thank you very much!
Re: Pickup lock -
Galletziz - 03.12.2014
Quote:
Originally Posted by dundolina
Thank you very much!
|
No problem, but try to study more about pawn, is not a difficult lenguage.