SA-MP Forums Archive
[Pedido] /mudar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] /mudar (/showthread.php?tid=514389)



/mudar - Comanfis157 - 21.05.2014

Galera alguйm poderia me ajudar com o comando /mudar , para o play mudar de classe quando quiser.
Comando em :
pawn Код:
if(strcmp(cmdtext,"/mudar",true)==0){



Re: /mudar - yoki - 21.05.2014

Код:
// Lets the player choose another class
COMMAND:mudar(playerid, params[])
{
	// Send the command to all admins so they can see it
	SendAdminText(playerid, "/mudar", params);

	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true)
	{
		// Check if the player has a wanted level of less than 3
		if (GetPlayerWantedLevel(playerid) < 3)
		{
			// Check if the player isn't in jail
			if (APlayerData[playerid][PlayerJailed] == 0)
			{
			    // Force the player back into class-selection
				ForceClassSelection(playerid);
				// Kill the player (required after ForceClassSelection)
				SetPlayerHealth(playerid, 0.0);
			}
			else
			    SendClientMessage(playerid, 0xFF0000FF, "[BTC] Vocк nгo pode usar o comando /reescolher quando preso!");
		}
		else
		    SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[BTC] Vocк nгo pode usar o comando /reescolher quando procurado!");
	}
	else
	    return 0;
	return 1;
}
eu nao sei como manda este PAWN CODE '-'


Re: /mudar - DiiMeNoR - 21.05.2014

Nгo precisa de comando para ir para class selection, sу apertar F4 e morrer. Ou entгo usa o comando mais fбcil.

pawn Код:
if(strcmp(cmdtext,"/mudar",true)==0)
{
    SetPlayerHealth(playerid, 0);
    ForceClassSelection(playerid);
}