Red Circle - Delivering materials
#3

Quote:
Originally Posted by Second
Quote:

public OnPlayerSpawn(playerid)//player comes alive
{
SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);// create marker
return 1;
}

public OnPlayerEnterCheckpoint(playerid)// player enters checkpoint
{
if(materialmen[playerid] == 1)// check if player is materialmen as job
{
GivePlayerMoney(playerid, 1000); // player gets 1000 $
DisablePlayerCheckpoint(playerid); // marker disapears
materials[playerid] = 0; // set player materials on 0
}
else
{
SendClientMessage(playerid, COLOR_RED,"you are not a material man");
return 1;
}

This is an example

so dont use itxD because it does not work xD

How would you do the point where he drops it off when my ''deliver'' looks like this?

Код:
else if(strcmp(x_nr,"deliver",true) == 0)
			{
			  if(PlayerToPoint(3.0,playerid,2287.7837,-1105.5237,37.9766))
			  {
			    if(MatsHolding[playerid] > 0)
			    {
			      new payout = (25)*(MatsHolding[playerid]);
			      format(string, sizeof(string), "* The Factory Gave You %d Materials from your %d Packages.", payout, MatsHolding[playerid]);
					  SendClientMessage(playerid, COLOR_WHITE, string);
			      PlayerInfo[playerid][pMats] += payout;
			      MatsHolding[playerid] = 0;
			    }
			    else
			    {
			      SendClientMessage(playerid, COLOR_GREY, "  You don't have any Materials Packages!");
				    return 1;
			    }
			  }
			  else
			  {
			    SendClientMessage(playerid, COLOR_GREY, "  You are not at the Materials Factory.");
			    return 1;
			  }
			}
Reply


Messages In This Thread
Red Circle - Delivering materials - by Chivava - 30.04.2010, 21:43
Re: Red Circle - Delivering materials - by geerdinho8 - 30.04.2010, 21:56
Re: Red Circle - Delivering materials - by Chivava - 30.04.2010, 22:01
Re: Red Circle - Delivering materials - by Chivava - 01.05.2010, 08:13

Forum Jump:


Users browsing this thread: 1 Guest(s)