07.02.2017, 13:31
PHP код:
public CourseTimer(playerid)
{
if(PlayerInfo[playerid][oncourse] == 1)
{
new string[512];
if(coursestep[playerid] == 1)
{
if(PlayerInfo[playerid][pLanguage] == 1)
{
strcat(string, ""COL_LIGHTBLUE"LESSON 1:\n", sizeof(string));
strcat(string, ""COL_RED"SPEED LIMITS\n\n", sizeof(string));
strcat(string, ""COL_GREEN"You should always follow those speed limits\n", sizeof(string));
strcat(string, ""COL_GREEN"CITY/TOWN: "COL_WHITE"80KM/H "COL_GREEN"| 4-lane Roads CITY: "COL_WHITE"100 KM/H "COL_GREEN"| Outside CITY/TOWN: "COL_WHITE"150 KM/H "COL_GREEN"| HIGHWAY: "COL_WHITE"NO LIMIT\n", sizeof(string));
strcat(string, ""COL_GREEN"There are hidden speed traps around the map, so pay attention!\n", sizeof(string));
strcat(string, ""COL_RED"Most of the car accidents happen due to speed, take care of your life\n", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 2;
}
else
{
strcat(string, ""COL_LIGHTBLUE"LECTIA 1:\n", sizeof(string));
strcat(string, ""COL_RED"LIMITELE DE VITEZA\n\n", sizeof(string));
strcat(string, ""COL_GREEN"Esti obligat sa respecti aceste limite tot timpul\n", sizeof(string));
strcat(string, ""COL_GREEN"ORAS/SAT: "COL_WHITE"80 KM/H "COL_GREEN"| 4 benzi - ORAS: "COL_WHITE"100 KM/H "COL_GREEN"| in afara Orasului/Satului: "COL_WHITE"150 KM/H "COL_GREEN"| AUTOSTRADA: "COL_WHITE"Nu e limita\n", sizeof(string));
strcat(string, ""COL_GREEN"Sunt radare ascunse peste tot pe harta, ai grija la ele!\n", sizeof(string));
strcat(string, ""COL_RED"Majoritatea accidentelor se intampla din cauza vitezei asa ca ai grija!\n", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 2;
}
}
else if(coursestep[playerid] == 2)
{
if(PlayerInfo[playerid][pLanguage] == 1)
{
strcat(string, ""COL_LIGHTBLUE"LESSON 2:\n", sizeof(string));
strcat(string, ""COL_RED"ABOUT CARS\n\n", sizeof(string));
strcat(string, ""COL_GREEN"We'll teach you few usefull car commands\n", sizeof(string));
strcat(string, ""COL_WHITE"/engine or KEY 2 "COL_GREEN"- This will start the engine of the car\n", sizeof(string));
strcat(string, ""COL_WHITE"/carlights or KEY CTRL "COL_GREEN"- This will turn on the headlights\n", sizeof(string));
strcat(string, ""COL_WHITE"/lock or KEY N "COL_GREEN"- This will lock your car, keep it safe\n", sizeof(string));
strcat(string, ""COL_GREEN"For more car commands type "COL_WHITE"/help "COL_GREEN" and select Cars", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 3;
}
else
{
strcat(string, ""COL_LIGHTBLUE"LECTIA 2:\n", sizeof(string));
strcat(string, ""COL_RED"DESPRE VEHICULE\n\n", sizeof(string));
strcat(string, ""COL_GREEN"Te vom invata cateva comenzi folositoare pentru vehicule\n", sizeof(string));
strcat(string, ""COL_WHITE"/engine sau TASTA 2 "COL_GREEN"- Aceste doua lucruri vor porni motorul masini\n", sizeof(string));
strcat(string, ""COL_WHITE"/carlights sau TASTA CTRL "COL_GREEN"- Aceste doua lucruri vor porni farurile masini\n", sizeof(string));
strcat(string, ""COL_WHITE"/lock sau TASTA N "COL_GREEN"- Aceste doua lucruri iti vor incuia masina, ai grija de masina ta\n", sizeof(string));
strcat(string, ""COL_GREEN"Pentru mai multe comenzi tasteaza "COL_WHITE"/help "COL_GREEN" si click pe Cars", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 3;
}
}
else if(coursestep[playerid] == 3)
{
if(PlayerInfo[playerid][pLanguage] == 1)
{
strcat(string, ""COL_LIGHTBLUE"LESSON 3:\n", sizeof(string));
strcat(string, ""COL_RED"HOW TO PARK YOUR CAR\n\n", sizeof(string));
strcat(string, ""COL_GREEN"If you don't park your car properly it will get towed\n", sizeof(string));
strcat(string, ""COL_GREEN"This lesson is mostly for those who are VIP as normal players are not able to park their cars\n", sizeof(string));
strcat(string, ""COL_GREEN"There are various parking spots around the map so make sure you park your car at one of those\n", sizeof(string));
strcat(string, ""COL_GREEN"If your car gets towed you will have to pay for it, if you fail to do so it will be destroyed\n", sizeof(string));
strcat(string, ""COL_GREEN"To find the impound lot type "COL_WHITE"/findimpound", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 4;
}
else
{
strcat(string, ""COL_LIGHTBLUE"LECTIA 3:\n", sizeof(string));
strcat(string, ""COL_RED"CUM SA-TI PARCHEZI MASINA\n\n", sizeof(string));
strcat(string, ""COL_GREEN"Daca nu iti parchezi masina regulamentar aceasta va fi tractata\n", sizeof(string));
strcat(string, ""COL_GREEN"Aceasta lectia este mai mult pentru VIP deoarce playeri normali nu-si pot parca masina\n", sizeof(string));
strcat(string, ""COL_GREEN"Sunt destule parcari pe harta unde iti poti lasa masina asa ca nu bloca strada\n", sizeof(string));
strcat(string, ""COL_GREEN"Daca parchezi neregulamentar si iti este tractata masina va trebui sa platesti ca sa o iei inapoi sau resti sa fie tractata\n", sizeof(string));
strcat(string, ""COL_GREEN"Pentru a gasi locul unde este tractata masina tasteaza "COL_WHITE"/findimpound", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 4;
}
}
else if(coursestep[playerid] == 4)
{
if(PlayerInfo[playerid][pLanguage] == 1)
{
strcat(string, ""COL_LIGHTBLUE"LESSON 4:\n", sizeof(string));
strcat(string, ""COL_RED"LANES\n\n", sizeof(string));
strcat(string, ""COL_GREEN"You must drive on the right lane\n", sizeof(string));
strcat(string, ""COL_GREEN"You can use other lanes to overtake vehicles or if the right lane is blocked\n", sizeof(string));
strcat(string, ""COL_GREEN"You can go on the wrong lane only if the right lane is blocked\n", sizeof(string));
strcat(string, ""COL_GREEN"Make sure you don't block the road because you put others and yourself in danger\n", sizeof(string));
strcat(string, ""COL_GREEN"If you fail to follow this rule you will receive a big ticket from "COL_WHITE"police", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 5;
}
else
{
strcat(string, ""COL_LIGHTBLUE"LECTIA 4:\n", sizeof(string));
strcat(string, ""COL_RED"BENZILE\n\n", sizeof(string));
strcat(string, ""COL_GREEN"Tine minte ca trebuie sa conduci pe partea dreapta\n", sizeof(string));
strcat(string, ""COL_GREEN"Ai voie sa folosesti celelalte benzi pentru a depasi vehicule sau daca banda ta este blocata\n", sizeof(string));
strcat(string, ""COL_GREEN"Ai voie sa mergi pe partea stanga a drumului doar daca partea dreapta este blocata\n", sizeof(string));
strcat(string, ""COL_GREEN"Asigurate ca nu blochezi drumul deoarece te pui pe tine si pe ceilalti in pericol\n", sizeof(string));
strcat(string, ""COL_GREEN"Daca nu respecti aceasta regula risti sa primesti o amenda destul de mare de la "COL_WHITE"politie", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 5;
}
}
else if(coursestep[playerid] == 5)
{
if(PlayerInfo[playerid][pLanguage] == 1)
{
strcat(string, ""COL_LIGHTBLUE"LESSON 5:\n", sizeof(string));
strcat(string, ""COL_RED"INTERSECTIONS\n\n", sizeof(string));
strcat(string, ""COL_GREEN"If you arrive at a intersection with 4 ways...\n", sizeof(string));
strcat(string, ""COL_GREEN"If the intersection has no road sign then the driver on the right has the right of way\n", sizeof(string));
strcat(string, ""COL_GREEN"Also keep in mind that you should never block the intersection\n", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 6;
}
else
{
strcat(string, ""COL_LIGHTBLUE"LECTIA 5:\n", sizeof(string));
strcat(string, ""COL_RED"INTERSECTIILE\n\n", sizeof(string));
strcat(string, ""COL_GREEN"Daca ajungi la o intersectie cu 4 intrari...\n", sizeof(string));
strcat(string, ""COL_GREEN"Daca intersectia nu are nici un semn rutier atunci soferul din dreapta are prioritate\n", sizeof(string));
strcat(string, ""COL_GREEN"Tine minte ca nu ai voie sa blochezi intersectiile\n", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 6;
}
}
else if(coursestep[playerid] == 6)
{
if(PlayerInfo[playerid][pLanguage] == 1)
{
strcat(string, ""COL_LIGHTBLUE"LESSON 6:\n", sizeof(string));
strcat(string, ""COL_RED"EMERGENCY VEHICLES\n\n", sizeof(string));
strcat(string, ""COL_GREEN"You should ALWAYS yeld to the emergency vehicles\n", sizeof(string));
strcat(string, ""COL_GREEN"If a emergency vehicle is aproaching you with sirens on then you should...\n", sizeof(string));
strcat(string, ""COL_GREEN"... slow down and pull over.\n", sizeof(string));
strcat(string, ""COL_GREEN"Don't follow emergency vehicles, you can get arrested for this\n", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 7;
}
else
{
strcat(string, ""COL_LIGHTBLUE"LECTIA 6:\n", sizeof(string));
strcat(string, ""COL_RED"VEHICULELE GUVERNAMENTALE\n\n", sizeof(string));
strcat(string, ""COL_GREEN"Esti obligat mereu sa-i dai prioritate la un vehicul cu sirenele pornite\n", sizeof(string));
strcat(string, ""COL_GREEN"Daca auzi sirenele unui vehicule guvernamental care se aproprie va trebui sa...\n", sizeof(string));
strcat(string, ""COL_GREEN"... incetinesti si sa tragi pe partea dreapta.\n", sizeof(string));
strcat(string, ""COL_GREEN"Nu urmari vehiculele guvernamentale, poti fi arestat pentru lucrul asta!\n", sizeof(string));
Update3DTextLabelText(texttable, -1, string);
coursestep[playerid] = 7;
}
}
}
return 1;
}
PHP код:
ctimer = SetTimerEx("CourseTimer", 14000, true, "i", playerid);