[HELP] /enter, /exit, /find
#5

Код:
  if(strcmp(cmd, "/find", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
		  if(PlayerInfo[playerid][pJob] != 1)
		  {
				SendClientMessage(playerid, COLOR_GREY, "  You are not a mercenary !");
				return 1;
		  }
			if(UsedFind[playerid] != 0 && PlayerInfo[playerid][pDetSkill] < 401)
			{
			  SendClientMessage(playerid, COLOR_GREY, "  You've already searched for someone, please wait for your time to reload!");
			  return 1;
			}
		  tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /find [playerid/PartOfName]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
			  if(giveplayerid != INVALID_PLAYER_ID)
			  {
			    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Find yourself!"); return 1; }
			    new points;
			    new level = PlayerInfo[playerid][pDetSkill];
					if(level >= 0 && level <= 50)
					{
						points = 4;
					}
					else if(level >= 51 && level <= 100)
					{
						points = 6;
					}
					else if(level >= 101 && level <= 200)
					{
						points = 8;
					}
					else if(level >= 201 && level <= 400)
					{
						points = 10;
					}
					else if(level >= 401)
					{
						points = 12;
					}
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
   				SetPlayerMarkerForPlayer(playerid,giveplayerid,0xFF6347AA);
					FindTime[playerid] = 1;
					FindTimePoints[playerid] = points;
					PlayerInfo[playerid][pDetSkill] ++;
					UsedFind[playerid] = 1;
					if(PlayerInfo[playerid][pDetSkill] == 50)
					{ SendClientMessage(playerid, COLOR_YELLOW, "* Your Mercenary Skill is now Level 2, you now have more time to find people."); }
					else if(PlayerInfo[playerid][pDetSkill] == 100)
					{ SendClientMessage(playerid, COLOR_YELLOW, "* Your Mercenary Skill is now Level 3, you now have more time to find people."); }
					else if(PlayerInfo[playerid][pDetSkill] == 200)
					{ SendClientMessage(playerid, COLOR_YELLOW, "* Your Mercenary Skill is now Level 4, you now have more time to find people."); }
					else if(PlayerInfo[playerid][pDetSkill] == 400)
					{ SendClientMessage(playerid, COLOR_YELLOW, "* Your Mercenary Skill is now Level 5, you now have more time to find people."); }
				}
			}
			else
			{
			  SendClientMessage(playerid, COLOR_GREY, "  Invalid Name/ID !");
			}
		}
Код:
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
   				SetPlayerMarkerForPlayer(playerid,giveplayerid,0xFF6347AA);
Reply


Messages In This Thread
[HELP] /enter, /exit, /find - by Oi! - 18.12.2009, 11:33
Re: [HELP] /enter, /exit, /find - by M4S7ERMIND - 18.12.2009, 12:26
Re: [HELP] /enter, /exit, /find - by Oi! - 18.12.2009, 14:57
Re: [HELP] /enter, /exit, /find - by dice7 - 18.12.2009, 15:45
Re: [HELP] /enter, /exit, /find - by Oi! - 18.12.2009, 16:49

Forum Jump:


Users browsing this thread: 1 Guest(s)