View Full Version : Help class change in server

19/03/2010, 07:19 PM
does anyone know how to script change player class my typing /changeteam
so you dont have to do F4 and then /kill

19/03/2010, 07:20 PM

Las Venturas CNR
19/03/2010, 07:31 PM
Under OnPlayerCommandText:

if(!strcmp(cmdtext, "/reclass", true)) // Change /reclass to the cmd you wish to use for it.
ForceClassSelection(playerid); // Acts as if you had pressed F4.
SetPlayerHealth(playerid,0); // Kills the person who requested the re-class.
return 1;

NOTE: You can't just use ForceClassSelection, as they will also have to be dead.

19/03/2010, 08:29 PM
here is it :
if(strcmp(cmdtext, "/changeteam", true) == 0) {
SendClientMessage(playerid,COLOR_BLUE,"Please Choose Another Team"); //change COLOR_BLUE to the color u want
return 1;

23/05/2012, 08:52 PM
Is there any way to do this without having to die? Its not the dying part that I don't like, its having a death on the player's stats that I'd like to circumvent. Some players care about their stats/ratio and don't want another death on their stats just so they can change teams.