[Ajuda] Bloquear comando.
#1

como eu bloqueio este comando so para outros mundos menos o MUNDO 5 [DM]

Code:
CMD:godmode(playerid)
{
	if(godmod[playerid] == false)
	{
		Msg(playerid, cortag, "{1E90FF}Godmode ON: {FFFFFF}Ativado!");
		godmod[playerid] = true;
		SetPlayerHealth(playerid, 99999);
		return 1;
	}
	else if(godmod[playerid] == true)
	{
		Msg(playerid, cortag, "{1E90FF}Godmod OFF: {FFFFFF}Desativado!");
		godmod[playerid] = false;
		SetPlayerHealth(playerid, 100);
		return 1;
	}
	return 1;
}
obs tenho 1000 mundos por ID so que o mundo 5 e para dm e eu queria bloquear pra ngm usar no mundo dm.

assim e so pro mundo DM
Code:
if(GetPlayerVirtualWorld(playerid) != 5) return Msg(playerid, Vermelho, "[x]: {FFFFFF}Comando liberado somente no mundo Livre[DM] ~> /Mundo 5");
como faзo pra por nos outros e bloquear no 5[DM]!

comando de mundos

Code:
CMD:mundo(playerid, params[])
{
    new mund;
    if(sscanf(params, "d",mund))
        return Msg(playerid, Vermelho, "[x]: {FFFFFF}Use: {FF0000}/Mundo [0 - 1000] - Mundo principal - /Mundo 0 - /Mundo [1 - 1000] - /Mundo 5 - Livre[DM]");

    if(mund < 0 || mund > 1000)
        return Msg(playerid, Vermelho, "[x]: {FFFFFF}Use: {FF0000}/Mundo [0 - 1000] [0 - 1000]");

    if(IsPlayerInAnyVehicle(playerid)){
        new car = GetVehicleModel(GetPlayerVehicleID(playerid));
        if(car == 520 || car == 432 || car == 592 || car == 425 || car == 464 || car == 476 || car == 447) DestroyVehicle(GetPlayerVehicleID(playerid));
    }
    if(mund == 4) {//Gravaзхes
        Msg(playerid, -1, "Mundo gravaзхes.");
        SetPlayerVirtualWorld(playerid, mund);
        SetPlayerHealth(playerid, 99999);
        ResetPlayerWeapons(playerid);
    }
    if(mund >= 0 || mund <= 1000){
        SetPlayerVirtualWorld(playerid, mund);
        SetPlayerHealth(playerid, 99999);
        ResetPlayerWeapons(playerid);
    }
    if(mund == 5) { //Livre
    	ResetPlayerWeapons(playerid);
        SetPlayerHealth(playerid, 100);
		SetPlayerArmour(playerid, 100);
        Msg(playerid, cortag, "Mundo Livre[DM].");
        SetPlayerVirtualWorld(playerid, mund);
        GivePlayerWeapon(playerid,24,10000);
        GivePlayerWeapon(playerid,25,10000);
        GivePlayerWeapon(playerid,32,10000);
		MundoDM[playerid] = true;
    }

    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2) {
        SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), mund);
    }
    format(String, 50, "Mundo: [%d]", mund);
    Msg(playerid, cortag, String);
    SetPlayerVirtualWorld(playerid, mund);
    SetPVarInt(playerid, "mundo", mund);
    Mundo[playerid] = mund;
    return true;
}
Reply


Messages In This Thread
Bloquear comando. - by apolo6666 - 07.07.2017, 16:01
Re: Bloquear comando. - by apolo6666 - 07.07.2017, 16:54
Re: Bloquear comando. - by OtimoJogo - 07.07.2017, 17:05
Re: Bloquear comando. - by apolo6666 - 07.07.2017, 17:06
Re: Bloquear comando. - by OtimoJogo - 07.07.2017, 17:16
Re: Bloquear comando. - by apolo6666 - 07.07.2017, 17:25
Re: Bloquear comando. - by OtimoJogo - 07.07.2017, 20:50
Re: Bloquear comando. - by apolo6666 - 21.07.2017, 00:25
Re: Bloquear comando. - by GuilhermeNunes - 21.07.2017, 00:42
Re: Bloquear comando. - by apolo6666 - 21.07.2017, 00:52
Re: Bloquear comando. - by GuilhermeNunes - 21.07.2017, 01:02
Re: Bloquear comando. - by apolo6666 - 21.07.2017, 01:03
Re: Bloquear comando. - by GuilhermeNunes - 21.07.2017, 01:06
Re: Bloquear comando. - by apolo6666 - 21.07.2017, 01:13
Re: Bloquear comando. - by GuilhermeNunes - 21.07.2017, 01:16
Re: Bloquear comando. - by GuilhermeNunes - 21.07.2017, 01:18
Re: Bloquear comando. - by IlanZ - 21.07.2017, 01:19
Re: Bloquear comando. - by GuilhermeNunes - 21.07.2017, 01:20
Re: Bloquear comando. - by IlanZ - 21.07.2017, 01:23
Re: Bloquear comando. - by GuilhermeNunes - 21.07.2017, 01:25
Re: Bloquear comando. - by apolo6666 - 21.07.2017, 02:06
Re: Bloquear comando. - by GuilhermeNunes - 21.07.2017, 02:59
Re: Bloquear comando. - by Relaxed - 21.07.2017, 03:15
Re: Bloquear comando. - by GuilhermeNunes - 21.07.2017, 03:42
Re: Bloquear comando. - by Meck - 21.07.2017, 13:23

Forum Jump:


Users browsing this thread: 9 Guest(s)