04.08.2011, 07:45
(
Последний раз редактировалось Lorenc_; 04.08.2011 в 10:11.
)
gTeams- Easy include to create teams!
Well, I figured out that most of the time for me SetPlayerTeam does not work with a anti-team kill usually it glitches and works for certain players only. This INC contains all certain things when it comes to creating teams, its a simple include but will require some things to it in order to compile your script.
Includes/Packages needed:
- OnPlayerShootPlayer
- YSI/y_hooks
Logs/Updates
Код:
** Just released OnPlayerShootPlayer has been hooked.
gT: Can be used as gTeam_, its pre-defined
pawn Код:
/*
native gTeam_CreateTeam(teamname[], teamid, color, bool: teamscore)
native gTeam_ToggleAntiTeamKill(bool: toggle)
native gTeam_SetPlayerTeam(playerid, teamid)
native gTeam_SetTeamDeathPenalty(penaltyid)
native GetTeamName(teamid)
native GetTeamCount()
native gGetPlayerTeam(playerid)
native SetTeamScoreRate(adder = 1, multiplier = 0)
native GetTeamScore(teamid)
native SetTeamScore(teamid, score)
native GiveTeamScore(teamid, score)
native ReturnPlayerName(pid)
native bool:IsPlayerSpawned(pid)
*/
teamname - Creates a team name for the specific team.
teamid - Team ID you want it to be created as.
color - Color of the team
bool:teamscore - Activate team scoring.
NOTE: MOST FUNCTIONS WILL NOT WORK WITHOUT A VALID TEAM!
gTeam_ToggleAntiTeamKill(bool: toggle)
toggle - true = yes; false = no; Enables anti team kill
gTeam_SetPlayerTeam(playerid, teamid)
playerid - playerid
teamid - the teamid selected
gTeam_SetTeamDeathPenalty(penaltyid)
penatlyid -sets the penalty to the killer once a team kill is made
GetTeamName(teamid)
teamid - the teamid selected
GetTeamCount()
No parameters
gGetPlayerTeam(playerid)
playerid - playerid
SetTeamScoreRate(adder = 1, multiplier = 0)
adder - How much to be added when a team score is added
multiplier - Multiples the adder by the number selected
GetTeamScore(teamid)
teamid - the teamid selected
SetTeamScore(teamid, score)
teamid - the teamid selected
score - score to be set to
GiveTeamScore(teamid, score)
teamid - the teamid selected
score - score to be added
ReturnPlayerName(pid) [EXTRA FUNCTION]
pid - playerid
bool:IsPlayerSpawned(pid) [EXTRA FUNCTION]
pid - playerid
Penaltys
pawn Код:
/* ** Penaltys ** */
#define MAX_PENALTYS 6 // There are currently 6!
#define PENALTY_NOTHING 0 // Do nothing...
#define PENALTY_KILL 1 // Kill the killerid
#define PENALTY_EXPLODE 2 // Explode the killerid
#define PENALTY_FLY 3 // Make the killerid fly
#define PENALTY_KICK 4 // Kick the player
#define PENALTY_WARN 5 // Warn the player
"This include/gm has Not been fully tested, bugs will be fixed in future versions if reported, simply report them on the thread, ill check."
There may be bugs, may. I would like to repair them asap. (Highly doubt though)
gTeams - Example GM
Credits to LV-DM, stole some things off there to make this basic GM... Modern LV-TDM xD
3 Teams: Groove, Balla, Ninjas
Includes used: ZCMD, Foreach & gTeam!
Download is right below where the inc download link is!
Credits
ZCMD creator - ZeeX
Lorenc - Include
Wups - OnPlayerShootPlayer INC
****** - YSI library/foreach
lv-dm - Copied vehicles and spawns
expertprogrammer & Norbert_G - Testing with me <3
Download
Include Download (v 0.1)
Example Gamemode (v 0.1)
Need more information just ask, I didn't bother to check the topics grammar, ill look into it after I get prepared for something occurring tommrow