/changeteam
#1

how to make a /changeteam with normal strcmp i tried it didn't work it just say Team change costed you $10000 here is the cmd
Код:
if(!strcmp(cmdtext, "/changeteam", true, 11))
	{
    SendClientMessage(playerid, BLUE, "Team change costed you $10000");
    GivePlayerMoney(playerid, -10000);
	ForceClassSelection(playerid);
	return 1;
	}
Reply
#2

I think you need to die first to change your class
pawn Код:
if(!strcmp(cmdtext, "/changeteam", true, 11))
{
    SendClientMessage(playerid, BLUE, "Team change costed you $10000");
    GivePlayerMoney(playerid, -10000);
    SetPlayerHealth(playerid, -50);
    ForceClassSelection(playerid);
    return 1;
}
Reply
#3

No there's no reason for setting the health to -50.
Also READ the WIKI and you wouldn't have to create this topic...

https://sampwiki.blast.hk/wiki/ForceClassSelection
Reply
#4

What Mike was saying with the link is that you have to kill the person AFTER using ForceClassSelection. Hence the link to the wiki where it explains that.
Reply
#5

ok thank you al for helping i forgot that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)