block team changing - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: block team changing (
/showthread.php?tid=187651)
block team changing -
marinov - 03.11.2010
how do I block team changing during the game ?
Ps: I have commands like /human to change teams
Re: block team changing -
Miguel - 04.11.2010
And what does /human do? I mean, what is its code?
Re: block team changing -
Welsh - 04.11.2010
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
Re: block team changing -
marinov - 04.11.2010
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)
Re: block team changing -
Welsh - 04.11.2010
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.
Re: block team changing -
marinov - 04.11.2010
Will try