19.01.2010, 14:38
Hello everyone. I've got a little question.
Well. I'm able to make ONE checkpoint. But just 1. not more.
I don't know how to make more. Look:
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid, 1693.0134,1590.6849,21.4086, 3.0);
}
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
return 1;
}
I don't have any errors with that.
But now I want to make another checkpoint somewhere else that will give you 3000 money.
So how to make another? I tryed this:
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid, 1693.0134,1590.6849,21.4086, 3.0);
SetPlayerCheckpoint(playerid, 1294.1214,1590.6849,44.2446, 3.0);
}
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, 3000);
DisablePlayerCheckpoint(playerid);
return 1;
}
So I just did 2 things in public OnPlayerSpawn(playerid) and public OnPlayerEnterCheckpoint(playerid)
Well. I failed at that. So can anyone help me please?
Well. I'm able to make ONE checkpoint. But just 1. not more.
I don't know how to make more. Look:
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid, 1693.0134,1590.6849,21.4086, 3.0);
}
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
return 1;
}
I don't have any errors with that.
But now I want to make another checkpoint somewhere else that will give you 3000 money.
So how to make another? I tryed this:
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid, 1693.0134,1590.6849,21.4086, 3.0);
SetPlayerCheckpoint(playerid, 1294.1214,1590.6849,44.2446, 3.0);
}
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, 3000);
DisablePlayerCheckpoint(playerid);
return 1;
}
So I just did 2 things in public OnPlayerSpawn(playerid) and public OnPlayerEnterCheckpoint(playerid)
Well. I failed at that. So can anyone help me please?