Command not working
#4

use mine command with zcmd and sscanf
Код:
CMD:makeleader(playerid,params[])
{
	new string[128], igrac, giveplayerid, giveplayer[MAX_PLAYER_NAME], level, sendername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, sendername, sizeof(sendername));
    if(IsPlayerAdmin(playerid))
	{
		if(!sscanf(params, "ui", giveplayerid, level))
		{
		    PlayerInfo[igrac][pRank] = 6;
		    PlayerInfo[igrac][pMember] = 0;
			GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
			if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1,"Pogresan igracev id");
			PlayerInfo[giveplayerid][pLeader] = level;
			format(string, sizeof(string), "Dao si igracu %s lidera organizacije %i", giveplayer, level);
			SendClientMessage(playerid, -1, string);
			format(string, sizeof(string), "Admin %s ti je dao lidera organizacije %i", sendername, level);
			SendClientMessage(giveplayerid, -1, string);
			if(level == 0) { PlayerInfo[giveplayerid][pSkin] = 0; PlayerInfo[giveplayerid][pRank] = 0; return 1; }
			else if(level == 1) { PlayerInfo[giveplayerid][pSkin] = 288; } //Policija
			SetPlayerSkin(giveplayerid,PlayerInfo[giveplayerid][pSkin]);
		}
		else SendClientMessage(playerid, -1,"Koristenje /makeleader [IDigraca/Dio imena] [broj(1-2)]");
	}
	else SendClientMessage(playerid, -1,"Niste ovlasteni da koristite ovu komandu");
	return 1;
}
edit this where is something not on english to you want
Reply


Messages In This Thread
Command not working - by AndreiWow - 08.09.2016, 21:32
Re: Command not working - by AndreiWow - 09.09.2016, 11:40
Re: Command not working - by AndreiWow - 09.09.2016, 20:45
Re: Command not working - by Dejan12345 - 09.09.2016, 21:00
Re: Command not working - by Skimmer - 10.09.2016, 09:03

Forum Jump:


Users browsing this thread: 1 Guest(s)