Check points....
#1

How can i make that if a player did something like /mission and he is in a car (Sadler) He gets some check points that he needs to go to and finally he gets 1000 dollars?
Reply
#2

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    GivePlayerMoney(playerid, 1000);
    DisablePlayerCheckpoint(playerid);
    return 1;
}
Is this what you mean?
Reply
#3

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mission", cmdtext, true, 10) == 0)
	{
		if(GetPlayerVehicleID == YOUR vehID here!) SetPlayerCheckpoint(playerid, COORDINATES here, 3.0);
		return 1;
	}
	return 0;
}
Код:
public OnPlayerEnterCheckpoint(playerid)
{
	GivePlayerMoney(playerid, 1000);
	DisablePlayerCheckpoint(playerid);
	return 1;
}
Rep would be nice if this did help you =)
tought im on phone so if there is a mistake im sorry

EDIT:
If you need to create more than one checkpoints, you can use this instead:

Код:
public OnPlayerEnterCheckpoint(playerid)
{
	GivePlayerMoney(playerid, 1000);
	DisablePlayerCheckpoint(playerid);
        SetPlayerCheckpoint(playerid, NEW coordinates, 3.0);
	return 1;
}
OR if you're making checkpoints like in a race, you can use SetPlayerRaceCheckpoint
https://sampwiki.blast.hk/wiki/SetPlayerRaceCheckpoint
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)