Lag after executing cmd -
77ther - 06.03.2011
I'm getting lags after executing cmds..
like /buyvehicle and dialog pops out, after you select car, you get like 1min lag and then the car spawns and everything works fine.. untill next cmd..
maybe it has something with my homehost? :S
Re: Lag after executing cmd -
Stigg - 06.03.2011
Can we see the Cmd ?
Re: Lag after executing cmd -
77ther - 06.03.2011
Quote:
Originally Posted by Stigg
Can we see the Cmd ?
|
it's like every cmd..
edit:
pawn Код:
if(strcmp(cmd, "/buyvehicle", true) == 0)
{
if(PlayerToPoint(3.0, playerid,-2138.0127,-2083.6497,64.5558)) return ShowPlayerDialog(playerid, DIALOG_BUYVEHICLE, DIALOG_STYLE_LIST, "Select the kind of vehicle you want to buy", "Bycicles\nBikes\nCars\nJeeps\nSport Cars\nVans/Utility", "Select", "Cancel");
SendClientMessage(playerid, COLOR_GREY, "[ERROR]: You are too far from the dealership!");
return 0;
}
pawn Код:
if(dialogid == DIALOG_BUYVEHICLEJEEPS)
{
if (response == 1)
{
switch(listitem)
{
case 0:
{
BuyVehicleForPlayer(playerid, 500);
}
case 1:
{
BuyVehicleForPlayer(playerid, 400);
}
case 2:
{
BuyVehicleForPlayer(playerid, 479);
}
case 3:
{
BuyVehicleForPlayer(playerid, 489);
}
case 4:
{
BuyVehicleForPlayer(playerid, 579);
}
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_BUYVEHICLE, DIALOG_STYLE_LIST, "Select the kind of vehicle you want to buy", "Bycicles\nBikes\nCars\nJeeps\nSport Cars\nVans", "Select", "Cancel");
}
}
example of the cmd,
I noticed that I'm missing returns, maybe that's causing it?
Re: Lag after executing cmd -
Stigg - 06.03.2011
lol I thought you meant just the /buyvehicle cmd.
Have you checked your loops and timers ?
Re: Lag after executing cmd -
77ther - 06.03.2011
Quote:
Originally Posted by Stigg
lol I thought you meant just the /buyvehicle cmd.
Have you checked your loops and timers ?
|
I edited my last answer, check it out..
Re: Lag after executing cmd -
Stigg - 06.03.2011
Quote:
Originally Posted by 77ther
I edited my last answer, check it out..
|
I cant see anything wrong m8, cant see it being the 'returns' you mentioned.
Sorry.
Re: Lag after executing cmd -
Roomeo - 06.03.2011
is this for anyone or only for you?
Re: Lag after executing cmd -
77ther - 06.03.2011
Quote:
Originally Posted by Roomeo
is this for anyone or only for you?
|
I'm the only one on my homehost so I don't know..
Re: Lag after executing cmd -
Skylar Paul - 06.03.2011
Show us your "BuyVehicleForPlayer" function, that is most likely what is causing the lag.
Re: Lag after executing cmd -
Stigg - 06.03.2011
Quote:
Originally Posted by Skylar Paul
Show us your "BuyVehicleForPlayer" function, that is most likely what is causing the lag.
|
Its happening with ALL his cmd's.