Red Circle - Delivering materials - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Red Circle - Delivering materials (
/showthread.php?tid=145093)
Red Circle - Delivering materials -
Chivava - 30.04.2010
Good evening SA-MP peoples,
I've been wondering how do i do so when i pass a red circle, either on foot, bike, car or any other vehicles that it drops off the materials packages so i recieve my materials from materials running?
Currently im using /materials deliver wich i want to change to just a red circle when you either enter it or goes throght it, it delivers the packages.
But im unsecure on how to do it, can anyone out there help me ?
I've never worked with red circle before so i might be a bit newbish on it.
Thanks
Re: Red Circle - Delivering materials -
geerdinho8 - 30.04.2010
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
Re: Red Circle - Delivering materials -
Chivava - 30.04.2010
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;
}
}
Re: Red Circle - Delivering materials -
Chivava - 01.05.2010
Currently my red circle delivering looks alike this, but yet it only disables the red circle and dont deliver the packages / gives any materials for the packages.
and its just underneath public OnPlayerEnterCheckPoint
Anyone out there that can help with this ?
Код:
else if(IsPlayerInRangeOfPoint(playerid, 2, 2287.7837,-1105.5237,37.9766))
{
if (PlayerInfo[playerid][pJob] != 23)
{
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;
DisablePlayerCheckpoint(playerid); // marker disapears
}
}
}