Problema cu o comanda
#1

Salutare ,am si eu niste mici probleme ... daca se poate sa ma ajutati o.0


Prima problema
Am modificat comanda " factionkick" as vrea sa apara numele factiunii adica sa apara un mesaj "Ai fost dat afara din factiunea x" acel x sa fie factiunea din care a fost dat afara (Tin sa mentionez ca folosesc YSI )

comanda este:
Код:
CMD:fackick(playerid,params[])
{
	if(pInfo[playerid][AdminLevel] >= 3 || pInfo[playerid][pFacLeader] == 1)
	{
	    new targetid;
	    new string[128];
	    new sext[64];
	    
	    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "/fackick [id]");
	    if(targetid != INVALID_PLAYER_ID)
	    {
	        if(pInfo[targetid][pFacID] == 1) { sext = "Police Departament"; }
			pInfo[targetid][pFacID] = 0;
			pInfo[targetid][pFacPRank] = 0;
			format(string,sizeof(string),"Ai fost dat afara din factiunea %s",pInfo[playerid][pFacID]);
			SendClientMessage(playerid,0xFFFFFFAA,string);
	    }
	}
	else
	{
	    SendClientMessage(playerid, COLOR_RED, "Only certain levels of Administration have access to this command.");
	}
	return 1;
}
Multumesc
Reply
#2

Код:
CMD:fackick(playerid,params[])
{
	if(pInfo[playerid][AdminLevel] >= 3 || pInfo[playerid][pFacLeader] == 1)
	{
	    new targetid;
	    new string[144];
	    new sext[20];
	    
	    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "/fackick [id]");
	    if(targetid != INVALID_PLAYER_ID)
	    {
	        if(pInfo[targetid][pFacID] == 1) { sext = "Police Departament"; }
                        new PlayerName[MAX_PLAYER_NAME];
                        GetPlayerName(targetid, PlayerName, MAX_PLAYER_NAME);
			pInfo[targetid][pFacID] = 0;
			pInfo[targetid][pFacPRank] = 0;
			format(string,sizeof(string),"Nick, %s (ID:%d) fost dat afara din factiunea %s",PlayerName,targetid,sext);
			SendClientMessage(playerid,0xFFFFFFAA,string);
                        SendClientMessage(targetid,0xFFFFFFAA,string);

	    }
	}
	else
	{
	    SendClientMessage(playerid, COLOR_RED, "Only certain levels of Administration have access to this command.");
	}
	return 1;
}
Reply
#3

Multumesc mult
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)