/911 problem
#1

Hello. Have a /911 [id] [crime] command. But don't work.Doesn't write the crime. Why?
Sorry bad english.
The code:
Код:
	if(strcmp(cmd, "/911", true) == 0) {
	  new tmp[256];
	  new crime;
		tmp = strtok(cmdtext, idx);

		if(!strlen(tmp)) {
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /911 [ID] [CRIME]");
			return 1;
		}
		giveplayerid = strval(tmp);

		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp)) {
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /911 [ID] [CRIME]");
			return 1;
		}
 		crime= strval(tmp);

		if (IsPlayerConnected(giveplayerid)) {
			GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "[RADIO] %s reported %s %s", sendername,giveplayer, crime);
			SendClientMessageToAll(COLOR_YELLOW, string);
		}else {
			format(string, sizeof(string), "%d : Wrong ID!", giveplayerid);
			SendClientMessage(playerid, COLOR_YELLOW, string);
		}
		return 1;
	}
Reply


Messages In This Thread
/911 problem - by gnorby88 - 04.03.2010, 18:04
Re: /911 problem - by gnorby88 - 04.03.2010, 18:21
Re: /911 problem - by Scenario - 04.03.2010, 18:27
Re: /911 problem - by gnorby88 - 04.03.2010, 19:33
Re: /911 problem - by afei - 04.03.2010, 20:26
Re: /911 problem - by gnorby88 - 04.03.2010, 22:11
Re: /911 problem - by gnorby88 - 05.03.2010, 10:14
Re: /911 problem - by Oxside - 05.03.2010, 11:09
Re: /911 problem - by bajskorv123 - 05.03.2010, 11:14
Re: /911 problem - by gnorby88 - 05.03.2010, 12:42

Forum Jump:


Users browsing this thread: 1 Guest(s)