fix my /reports /setvip commands
#1

whenever i write it in-game /report it always show me twice this command /report (playerid) (reason)
Код:
CMD:report(playerid, params[])
{
	if(pInfo[playerid][pLogged] == 1)
	{

		new text[128],targetid,string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
		if(sscanf(params, "us[128]", targetid, text)) SendClientMessage(playerid, COLOR_GREY, "Usage: /report [playerid] [reason]");
		else
		{
			if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Invaild ID - That player is not connected!");
			format(sendername, sizeof(sendername), "%s", PlayerName(playerid));
			format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid));
			format(string, sizeof(string), "Report: %s[%d] has reported %s[%d] [Reason: %s]", sendername, playerid, giveplayer, targetid, text);
			SendMessageToAdmins(COLOR_YELLOW,string);
			printf("Report: %s[%d] has reported %s[%d] [Reason: %s]", sendername, playerid, giveplayer, targetid, text);
			SendClientMessage(playerid, COLOR_GREEN,"Thanks for reporting!");
		}
	}
    else if(pInfo[playerid][pLogged] == 0)
	{
		SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!");
		printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid));
		Kick(playerid);
	}
	return 1;
}
this also whenever i write /setvip it shows me the message twice /setvip (id) (level)
Код:
CMD:setvip(playerid,params[])
{
	if(pInfo[playerid][pLogged] == 1)
	{
		if(pInfo[playerid][pAdminLevel] >= 6)
		{
			new targetid,level,string[256];
			if(sscanf(params, "ud", targetid, level)) return  SendClientMessage(playerid,-1,""chat" /setdonor [playerid] [level]");
			if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
			if(level < 0 || level > 5) return SendClientMessage(playerid,-1,""chat" Vip levels are ONLY between 1-5");

			pInfo[targetid][pVipLevel] = level;

			format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s have given vip status of %d to %s",GetAdminName(playerid),PlayerName(playerid),level,PlayerName(targetid));
			SendClientMessageToAll(-1,string);
			printf(" %s %s have given vip status of %d to %s",GetAdminName(playerid),PlayerName(playerid),level,PlayerName(targetid));
		}
		else {
			SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
		}
	}
    else if(pInfo[playerid][pLogged] == 0)
	{
		SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!");
		printf("%s has been kicked for trying to use a command without being logged in!", PlayerName(playerid));
		Kick(playerid);
	}
	return 1;
}
Reply


Messages In This Thread
fix my /reports /setvip commands - by Pakistanboy321 - 21.02.2014, 17:13
Re: fix my /reports /setvip commands - by Ryan_Undering - 21.02.2014, 17:54
Re: fix my /reports /setvip commands - by Pakistanboy321 - 22.02.2014, 04:33
Re: fix my /reports /setvip commands - by ahmedkoki - 22.02.2014, 04:57
Re: fix my /reports /setvip commands - by Pakistanboy321 - 22.02.2014, 05:12
Re: fix my /reports /setvip commands - by ]Rafaellos[ - 22.02.2014, 05:29
Re: fix my /reports /setvip commands - by Pakistanboy321 - 22.02.2014, 05:56
Re: fix my /reports /setvip commands - by ]Rafaellos[ - 22.02.2014, 06:18
Re: fix my /reports /setvip commands - by Pakistanboy321 - 22.02.2014, 06:22
Re: fix my /reports /setvip commands - by Pakistanboy321 - 22.02.2014, 06:25

Forum Jump:


Users browsing this thread: 1 Guest(s)