command isint working
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/kill", true))
	{
		SetPlayerHealth(playerid, 0);
		return true;
	}

	if(!strcmp(cmdtext, "/kmisija", true))
	{
	    if( zInfo[ playerid ][ Admin ] < 1) return 0;
		new msg[ 180 ];
		format(msg, 180, "[ 1 ] Armijos Maљina\n[ 2 ] Katafalko vogimas\n[ 3 ] Љviturys\n[ 4 ] Dviračių lenktynės\n[ 5 ] Malunsparnis\n[ 6 ] Piktos Babces\n[ 7 ] Parkour\n[ 8 ] GunGame\n[ 9 ] Motoroleriai");
		ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"{9900cc}Misijos",msg,"Keisti","Iseiti");
		return true;
	}
	return 0;
}
/kill is working but /kmisija not, even i'm admin
Reply
#2

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/kill", cmdtext, true, 5) == 0)
    {
        SetPlayerHealth(playerid, 0.0);
        return 1;
    }
    return 0;
}
Reply
#3

For kill command you can use this one

Код:
    if(strcmp(cmdtext, "/kill", true) == 0)
	{
        dmyasagi[playerid] = 0;
        SetPlayerHealth(playerid, 0.00);
        ResetPlayerWeapons(playerid);
        SetPlayerInterior(playerid, 0);
        GivePlayerMoney(playerid, -1000);
        GameTextForPlayer(playerid,"~n~~n~~n~~r~Y~g~O~y~b~U~D~p~E~p~A~r~D~w~!~n~-1000$",2500,5);
        SetPlayerWorldBounds(playerid,20000.0000,-20000.0000,20000.0000,-20000.0000);
		TogglePlayerControllable(playerid, true);
		SetCameraBehindPlayer(playerid);
        return 1;
    }
OR this one

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/kill", true) == 0)
	{
		SetPlayerHealth(playerid, 0.00);
		return true;
	}
	if(!strcmp(cmdtext, "/kmisija", true))
	{
	    if( zInfo[ playerid ][ Admin ] < 1) return 0;
		new msg[ 180 ];
		format(msg, 180, "[1] Armijos Maљina\n[2] Katafalko vogimas\n[3] Љviturys\n[4] Dviraciu lenktynes\n[5] Malunsparnis\n[6] Piktos Babces\n[7] Parkour\n[8] GunGame\n[9] Motoroleriai");
		ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"{9900cc}Misijos",msg,"Keisti","Iseiti");
		return true;
	}
	return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)