SA-MP Forums Archive
How to make a command like this ? - 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: How to make a command like this ? (/showthread.php?tid=125081)



How to make a command like this ? - AlbanianGuy - 02.02.2010

I wanted to kame a command like this .... /reclass teamB and you will spawn as a teamB player ? Can anyone help me ?
And another question .. how to make a team balancer like ... [SERVER]:teamB is not avaliable . You will spawn as teamA ... (only if you press shift you will spawn as teamA )
So can anyone help me ?


Re: How to make a command like this ? - Onyx09 - 02.02.2010

Lol arent you trying to make a Random Team Spawn player?


Re: How to make a command like this ? - bluray - 02.02.2010

um u could do a like a
strcmp blah blah /reclass teamb
go gTeam[playerid] = TEAM_GROVE;
and also set player skin to whatever it is.
u could also respawn the player and then all the correct adjustments will be changed.

um.. the team balancer u need to a way to find out how many people are on the team. idk really know that or the shift thing sorry.

good lick,
ray


Re: How to make a command like this ? - AlbanianGuy - 02.02.2010

Quote:
Originally Posted by bluray
um u could do a like a
strcmp blah blah /reclass teamb
go gTeam[playerid] = TEAM_GROVE;
and also set player skin to whatever it is.
u could also respawn the player and then all the correct adjustments will be changed.

um.. the team balancer u need to a way to find out how many people are on the team. idk really know that or the shift thing sorry.

good lick,
ray
ok thanks ray .. but can u explauin more the command /reclass ... and i got another question ,...
Quote:
Originally Posted by bluray
good lick,
... OK I WILL LICK IT



Re: How to make a command like this ? - bluray - 03.02.2010

Quote:
Originally Posted by AlbanianGuy
Quote:
Originally Posted by bluray
um u could do a like a
strcmp blah blah /reclass teamb
go gTeam[playerid] = TEAM_GROVE;
and also set player skin to whatever it is.
u could also respawn the player and then all the correct adjustments will be changed.

um.. the team balancer u need to a way to find out how many people are on the team. idk really know that or the shift thing sorry.

good lick,
ray
ok thanks ray .. but can u explauin more the command /reclass ... and i got another question ,...
Quote:
Originally Posted by bluray
good lick,
haha very funny

ok well first i need to know like what things ur g_team has. like for eXAMPL if u have certain weapons defined in the gteam for each time i need to know like certain colours and things. Because u can make ur player change his team but u need to respawn him for all thins changes to change. this doesnt always mean he has to die, like on my thing it just spawns again and changes are made. anyway ur command will look like this
a bit
Код:
if(strcmp, cmdtext, "/reclassb", true) == 0)
{
 gteam[playerid] = TEAM_LICKERS(lol)
resetplayerweapons(playerid);
setplayerskin(playerid, 10);
SpawnPlayer(playerid);
}
this will basically respawn the player and change his team. if you set the players color and everything at the onplayerspawn section this should work well.
this will basicall


Re: How to make a command like this ? - AlbanianGuy - 04.02.2010

the code didnt work ... it just respawned the player .... same skin ... same things .. same spawn .. and same everything ..



Re: How to make a command like this ? - bluray - 04.02.2010

omg you werent meant to copy that code. it was a guide. some things require capital letters and so on.. o thought u knew how to script a bit.


Re: How to make a command like this ? - AlbanianGuy - 04.02.2010

Quote:
Originally Posted by bluray
omg you werent meant to copy that code. it was a guide. some things require capital letters and so on.. o thought u knew how to script a bit.
i did change the first letter of each word into a capital letter before u sent this message .. but ... it just spawns u withthe same skin ...


Re: How to make a command like this ? - AlbanianGuy - 06.02.2010

BUMP


Re: How to make a command like this ? - bluray - 08.02.2010

idk, this was more a suggestion, go to the fuction list and select their SetPlayerSkin and do what they want in the brackets, otherwise send player back to class selection on death.