block team changing
#1

how do I block team changing during the game ?
Ps: I have commands like /human to change teams
Reply
#2

And what does /human do? I mean, what is its code?
Reply
#3

I think he wants to stop character selection on server entry and make commands to select teams, something like /cop - sets you as a cop... If not please explain! =D
Reply
#4

I mean, if a player is killed by a zombie, he is transfered to the zombies team, but if he type
/human he goes back to the humans team, I want to block that (the going back command)
Reply
#5

Something like:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
             SetPlayerTeam(playerid, TEAM_ZOMBIE);? (Or what ever team zombie is called for you).
	return 1;
}
And as for /human try:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/human", cmdtext, true, 10) == 0)
	{
              SetPlayerTeam(playerid, TEAM_HUMAN); (Or what ever team humam is called for you).      
 	 return 1;
	}
             return 0;
}
I'm kinda new to scripting but just try it, hopefuly it will do what you wan't, depending on if you have teams...
Sorry if its wrong.
Reply
#6

Will try
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)