04.08.2011, 15:14
Is this right?
When I do the command,
How would I do the thing for OnPlayerEnterCheckpoint?
I've tried to to it, would it be something like this?
Does that look alright to you?, if not please could you help me on how to complete this so it works.
When I do the command,
pawn Код:
command(playerid, params[])
{
if(Player[playerid][CPSET] == 0)
{
SetPlayerCheckpoint(playerid, x, y, z, size);
Player[playerid][CPSET] == 1;
SendClientMessage(playerid, WHITE, "You must go and pick up the delivery things, to get them delivered.");
}
else
{
SendClientMessage(playerid, WHITE, "You already have a checkpoint set, please go to it.");
}
return 1;
}
I've tried to to it, would it be something like this?
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(Player[playerid][CPSET] == 0)
{
SetPlayerCheckpoint(playerid, x, y, z, size);
SendClientMessage(playerid, WHITE, "You must deliver the products to the delivery point.");
DisablePlayerCheckpoint(playerid);
Player[playerid][CPSET] == 2;
}
return 1;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(Player[playerid][CPSET] == 2)
{
SendClientMessage(playerid, WHITE, "Well done, you have completed the trucking side-job.");
DisablePlayerCheckpoint(playerid);
Player[playerid][CPSET] == 0;
}
return 1;
}