10.11.2013, 23:33
A better code in my opinion would be:
pawn Код:
// top of the script
#define MAX_CHECKPOINTS (3)
static Float: checkpointLocations[MAX_CHECKPOINTS][3] =
{
{ 2332.1140, -1680.7076, 13.7506 },
{ 2508.3562, -1654.8031, 13.8660 },
{ 2141.2703, -1611.0664, 13.8660 },
{ 1092.9705, -1093.6687, 25.5253 }
};
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
{
new rand = random(MAX_CHECKPOINTS);
SetPlayerCheckpoint(playerid, checkpointLocations[rand][0], checkpointLocations[rand][1], checkpointLocations[rand][2], 5.0);
SendClientMessage(playerid, -1," Drive the pizza bike to the checkpoint then bring back the bike!");
}
}