i am getting some errors from my script and i dont know whats wrong with it.
Driver Places.
Код HTML:
new Float:DriverPlaces[][] = {
{1261.2803,-1302.3578,12.9341,1.0}, // HARVEST_CP_TYPE_1 > START
{1218.6676,-1278.5900,13.1790,2.0}, // HARVEST_CP_TYPE_2
{1074.3923,-1278.6927,13.1785,2.0}, // HARVEST_CP_TYPE_2
{1000.0599,-1319.7504,13.1866,2.0}, // HARVEST_CP_TYPE_2
{794.9609,-1376.1951,13.2309,2.0}, // HARVEST_CP_TYPE_2
{793.9224,-1449.1443,13.1829,2.0}, // HARVEST_CP_TYPE_2
{749.2060,-1624.4762,9.5558,2.0}, // HARVEST_CP_TYPE_2
{682.3353,-1740.9697,13.1417,2.0}, // HARVEST_CP_TYPE_2
{634.7794,-1524.4056,14.7511,2.0}, // HARVEST_CP_TYPE_2
{754.3268,-1402.3373,13.1705,2.0},
{1055.3893,-1402.6996,13.2222,2.0},
{1260.6417,-1363.2773,12.9774,3.0},
{1279.6249,-1379.1647,13.0789,4.0} // HARVEST_CP_TYPE_3_size_7 > FINISH
};
Код HTML:
if(GetPVarInt(playerid, "DriverCP") != 0 && PlayerInfo[playerid][driverlic] != 1)
{
new cnt = GetPVarInt(playerid, "DriverCP");
if(DriverPlaces[cnt][0] == 1)
{
SetPVarInt(playerid, "DriverAmount", 0);
format(message, 128, "~y~checkpoints:~n~~w~0/13");
TextDrawHideForPlayer(playerid, Harvest[playerid]);
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
SendClientMSG(playerid, COLOR_LIGHTGREY, "* %s you have passed the drivers test. You have recieved a license.", RPName(playerid));
SetPVarInt(playerid, "DriverCP",0);
KillTimer(CPTimer[playerid]);
DisablePlayerCheckpoint(playerid);
PlayerPlaySound(playerid,1054,0.0,0.0,0.0);
return 1;
}
if(DriverPlaces[cnt][1] == 2)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][2] == 3)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][2] == 3)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][3] == 4)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][4] == 5)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][5] == 6)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][6] == 7)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][7] == 8)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][8] == 9)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][9] == 1)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][10] == 11)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][11] == 12)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
if(DriverPlaces[cnt][12] == 13)
{
SetPVarInt(playerid, "DriverAmount", GetPVarInt(playerid, "DriverAmount")+1);
format(message, 128, "~y~checkpoints:~n~~w~%d/13",GetPVarInt(playerid, "DriverAmount"));
TextDrawSetString(Harvest[playerid], message);
TextDrawShowForPlayer(playerid, Harvest[playerid]);
}
cnt++;
SetPVarInt(playerid, "DriverCP", cnt);
KillTimer(CPTimer[playerid]);
DisablePlayerCheckpoint(playerid);
CPTimer[playerid] = SetTimerEx("SetCP", 500, true, "dffff", playerid, DriverPlaces[cnt][0],DriverPlaces[cnt][1],DriverPlaces[cnt][2],DriverPlaces[cnt][3],DriverPlaces[cnt][4],DriverPlaces[cnt][5],DriverPlaces[cnt][6],DriverPlaces[cnt][7],DriverPlaces[cnt][8],DriverPlaces[cnt][9],DriverPlaces[cnt][10],DriverPlaces[cnt][11],DriverPlaces[cnt][12],DriverPlaces[cnt][13], 3.0);
return 1;
}