- 0
Problema la Timer
-
Similar Content
-
- 2 answers
- 545 views
-
Problema turf
By Soryn.,
- 3 answers
- 381 views
-
- 0 replies
- 17 views
-
- 2 replies
- 321 views
-
- 1 reply
- 196 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
Eduarth
Salut sunt incepator in ale scriptului dar nu ma descurc la pasul functiei SetTimer/SetTimerEx.
Am un filescript, recunosc nu e facut de mine. In acest filescript este legat de PizzaJob si totul este in regula pana la checkpointuri unde nu pot adauga SetTimer/SetTimerEx, adica dupa ce intra in Checkpoint sa stea macar 10 secunde in el apoi in continuare sa ii de-a voie sa mearga la urmatorul checkpoint.
[pawn]public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/pizza", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
{
PizzaJob[playerid] = 1;
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s is now a Pizzaboy.", name );
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10);
SendClientMessage(playerid,COLOR_YELLOW,"* Follow the red markers and you'll recieve money!");
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be on a pizza bike to start the job!");
}
return 0;
}[/pawn]
[pawn]public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448)
{
if(PizzaJob[playerid] == 1)
{
PizzaJob[playerid] = 2;
SetPlayerCheckpoint(playerid,2012.4771,-1640.1229,13.1431,10);
SendClientMessage(playerid,COLOR_YELLOW,"* Please go to the next mark, and you'll be payed!");
return 1;
}
if(PizzaJob[playerid] == 2)
{
PizzaJob[playerid] = 3;
SetPlayerCheckpoint(playerid,2387.0063,-1667.1498,13.1249,10);
return 1;
}
if(PizzaJob[playerid] == 3)
{
PizzaJob[playerid] = 4;
SetPlayerCheckpoint(playerid,2414.9255,-1649.6678,13.1305,10);
return 1;
}
........
if(PizzaJob[playerid] == 11){
PizzaJob[playerid] = 0;
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid,COLOR_YELLOW,"* You have recieved $400 for delivering the pizzas.");
GivePlayerMoney(playerid,400);
}
}
[/pawn]
Deci nu stiu cum sa un un Timer la fiecare Checkpoint.
Va rog frumos daca ma puteti ajuta, as ramane recunoscator. Multumesc.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts