Have problem with using SetPlayerWantedLevel(targetid,amount);
#2

Код:
public OnPlayerCommandText(playerid,cmdtext[]) {

	new cmd[256];
	new idx;
	cmd = strtok(cmdtext,idx);
	new tmp[256];
	// WANTED
	if (strcmp(cmd, "/wanted", true) == 0)
	{
	tmp = strtok(cmdtext,idx);
	if(!strlen(tmp)) {
	SendClientMessage(playerid,COLOR_LIGHTBLUE,"You forget amount of stars or playerID -> /wanted [ID] [amount 1-6]");
	return 1;
	}
	new targetid = strval(tmp); // Target ID
	tmp = strtok(cmdtext,idx);
	new amount = strval(tmp); // How many stars
	if(PlayerInfo[playerid][logged] == 0) {
	SendClientMessage(playerid,COLOR_BRIGHTRED,"You must be logged in!");
	return 1;
	}
	if (PlayerInfo[playerid][admin] < 2) {
	SendClientMessage(playerid,COLOR_BRIGHTRED,"You have no rights to use this command... Or your security clearance are too low.");
	return 1;
	}
	if(PlayerInfo[targetid][logged] == 0) {
	SendClientMessage(playerid,COLOR_BRIGHTRED,"Player not found!");
	return 1;
	}
	SetPlayerWantedLevel(targetid,amount); // The main function
	return 1;
	}
	return 0;
}
Reply


Messages In This Thread
Have problem with using SetPlayerWantedLevel(targetid,amount); - by woaha - 03.08.2009, 15:34
Re: Have problem with using SetPlayerWantedLevel(targetid,amount); - by Jefff - 03.08.2009, 23:06

Forum Jump:


Users browsing this thread: 1 Guest(s)