25.11.2014, 17:54
Hello, I tried to make a DMV test, but I have a bug. When enter in first checkpoint, it show on mini-map a checkpoint in San Fierro, and I didn't put it there. Something wrong in script?
pawn Код:
enum pInfo
{
Permis
}
new PlayerInfo[MAX_PLAYERS][pInfo];
new ExCC[MAX_PLAYERS];
new TakeLesson[MAX_PLAYERS];
CMD:permis(playerid, params[])
{
SCM(playerid, -1, "{15FF00}Informatie: {FFCC33}Ai inceput sa dai permisul auto !");
SCM(playerid, -1, "{15FF00}Informatie *2: {FFCC33}Urmareste checkpoint-urile pentru a reusi sa treci acest test !");
ExCC[playerid] = 1;
TakeLesson = 1;
SetPlayerCheckpoint(playerid, 1136.1632,-1849.8740,13.1252, 3.0);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(ExCC[playerid] == 1)
{
ExCC[playerid] = 2;
SetPlayerCheckpoint(playerid, -1051.4005,-655.8729,31.7361, 3.0);
return 1;
}
if(ExCC[playerid] == 2)
{
ExCC[playerid] = 3;
SetPlayerCheckpoint(playerid, 1024.4673,-1798.1388,13.4925, 3.0);
}
if(ExCC[playerid] == 3)
{
ExCC[playerid] = 4;
SetPlayerCheckpoint(playerid, 918.7630,-1720.5988,13.1238, 3.0);
}
if(ExCC[playerid] == 4)
{
ExCC[playerid] = 5;
SetPlayerCheckpoint(playerid, 969.1702,-1573.9977,13.1235, 3.0);
}
if(ExCC[playerid] == 5)
{
ExCC[playerid] = 6;
SetPlayerCheckpoint(playerid, 1279.7999,-1571.8436,13.1239, 3.0);
}
if(ExCC[playerid] == 6)
{
ExCC[playerid] = 7;
SetPlayerCheckpoint(playerid, 1296.8096,-1794.5247,13.1238, 3.0);
}
if(ExCC[playerid] == 7)
{
DisablePlayerCheckpoint(playerid);
ExCC[playerid] = 0;
SCM(playerid, -1, "{15FF00}Succes. {FFCC33}Ai primit permisul cu succes!");
SCM(playerid, -1, "{15FF00}Tine minte {FF0000}Condu intotdeauna {15FF00}PRUDENT {FF0000}!");
PlayerInfo[playerid][Permis] = 1;
TakeLesson = 0;
}
return 1;
}
public OnPlayerFailExam(playerid)
{
if(TakeLesson(playerid) == 1)
{
TakeLesson = 0;
SendClientMessage(playerid, -1, "You crashed vehicle, so you lost exam!");
}
return 1;
}