Suspect Command not working good
#1

Код:
CMD:su(playerid, params[])
{
	new id, crime;
	new string[128];
	if(sscanf(params, "us", id, crime)) return SendClientMessage(playerid, COLOR_ORANGE, "Koristi: {FFFFFF}/su [ID/Nick] [Zlocin]");
	else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}>> [GRESKA] {FFFFFF}Krivi ID!");
	format(string, sizeof string, "Officer %s reported - %s.", playerid, id); //officer reported player
	SendClientMessage(playerid, 0x9955DEEE, string);
	format(string, sizeof string, "You put wanted on %s reason - %s.", id, crime); // officer put wanted on player with reason
	SendClientMessage(playerid, 0x9955DEEE, string);
	format(string, sizeof string, "**ALL UNITS** %s is wanted for - %s.", id, crime); //Sending message to all officers .... Nick and Reason
	SendFamMessage(1,0x9955DEEE, string);
	SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1);
	return 1;
}
get this - sscanf warning: Strings without a length are deprecated, please add a destination size.
Reply
#2

if(sscanf(params, "us[128]", id, crime))
Pretty sure that is what it is.
Reply
#3

Still not working
Reply
#4

Your crime variable needs to be a string.
Reply
#5

Can you make it? :S
Reply
#6

Try this.

PHP код:
if(sscanf(params"us[128]"idstring)) return SendClientMessage(playeridCOLOR_ORANGE"Koristi: {FFFFFF}/su [ID/Nick] [Zlocin]"); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)