Problem with the /suspect Cmd
#1

Need some help with the /suspect Cmd, it gives me no errors, but when I type the Cmd it says that info /suspect [playerid] [1-6] [crime] whatever I type.... So if I type /suspect 0 6 Runner it still gives me that

Код:
CMD:suspect(playerid,params[])
{
	if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pLeader] == 1)
	{
		if(PlayerInfo[playerid][pLogged] == 0) return SendClientMessage(playerid,COLOR_WHITE,"*** Trebuie sa te logezi/inregistrezi mai intai.");
		if(CopOnDuty[playerid] == 0) return SendClientMessage(playerid,COLOR_WHITE,"You are not on Duty!");
		new id,wantedlevel,crime[128],string[128];
		new CopName[MAX_PLAYER_NAME],SuspectName[MAX_PLAYER_NAME];
		if(sscanf(params,"uui[128]",id,wantedlevel,crime)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: (/su)spect [playerid] [1-6] [crime]");
		if(playerid == id) return SendClientMessage(playerid,COLOR_WHITE,"You cannot suspect yourself!");
		if(PlayerInfo[id][pFaction] == 1 || PlayerInfo[id][pLeader] == 1) return SendClientMessage(playerid,COLOR_WHITE,"You cannot give wanted to a Cop!");
		if(wantedlevel == PlayerInfo[id][pWanted]) return SendClientMessage(playerid,COLOR_WHITE,"That player is already a suspect!");
        SetPlayerWantedLevel(id,wantedlevel);
		PlayerInfo[id][pWanted] = wantedlevel;
		GetPlayerName(playerid,CopName,sizeof(CopName));
		GetPlayerName(id,SuspectName,sizeof(SuspectName));
		foreach(new i:Player)
		{
			if(PlayerInfo[i][pFaction] == 1 || PlayerInfo[i][pLeader] == 1)
			{
 	 			format(string,sizeof(string),"Suspect: "COLOR_RED"%s {0x0000FFFF}Crime: "COLOR_RED"%s {0x0000FFFF}Reporter: "COLOR_RED"%s",SuspectName,crime,CopName);
                SendClientMessage(i,0x0000FFFF,"HQ: All Units, Crime Report:");
			 	SendClientMessage(i,0x0000FFFF,string);
				print("(PD/FBI/NG Chat) HQ: All Units, Crime Report:");
				print(string);
			}
		}
	}
 	else
	{
	    SendClientMessage(playerid,COLOR_WHITE,"You are not a COP/FBI Agent/NG!");
	}
	return 1;
}

CMD:su(playerid,params[]) return cmd_suspect(playerid,params);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)