Stoping game :S - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Stoping game :S (
/showthread.php?tid=292853)
Stoping game :S -
Speed - 25.10.2011
When my server on, and on server are I and my friend I see my frien and his skin is not moving, and i teleport to him and he is far from skin, and he move, but skin dosent, pls help
Re: Stoping game :S -
=WoR=Varth - 25.10.2011
You mean desynced?
Take a look at your OnPlayerUpdate.
Re: Stoping game :S -
|_ⒾⓇⓄN_ⒹⓄG_| - 25.10.2011
wow
weird
can be lag too maybe
u have high ping?
Re: Stoping game :S - suhrab_mujeeb - 25.10.2011
Quote:
Originally Posted by |_ⒾⓇⓄN_ⒹⓄG_|
wow
weird
can be lag too maybe
u have high ping?
|
Nope not due to ping. It sure is a sync problem. Same happened on
HuSs3n's server which he fixed real soon. I will leave him a message to see in.
Re: Stoping game :S - HuSs3n - 25.10.2011
replace
Код:
public OnPlayerUpdate(playerid)
{
}
with
Код:
public OnPlayerUpdate(playerid)
{
return 1;
}
Re: Stoping game :S -
Speed - 25.10.2011
my OnPlayerUpdate
pawn Код:
public OnPlayerUpdate(playerid)
{
new vehicleid,Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,speed_string[256],final_speed_int;
vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid != 0)
{
GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
final_speed_int = floatround(final_speed,floatround_round);
format(speed_string,256,"Speed: %i",final_speed_int);
TextDrawSetString(SPEEDOS[playerid], speed_string);
}
else
{
TextDrawSetString(SPEEDOS[playerid], " ");
}
if(GetPVarInt(playerid, "EventKizla") == 1 && !IsPlayerInAnyVehicle(playerid))
{
GameTextForPlayer(playerid, "~r~STUNT FAJL", 3000, 4);
SetPVarInt(playerid,"Stunt1",0);
SetPVarInt(playerid,"Stunt2",0);
SetPVarInt(playerid,"Stunt3",0);
SetPVarInt(playerid,"Stunt4",0);
SetPVarInt(playerid,"Stunt5",0);
SetPVarInt(playerid,"Stunt6",0);
SetPVarInt(playerid, "EventKizla", 0);
DisablePlayerCheckpoint(playerid);
}
}
Re: Stoping game :S -
AeroBlast - 25.10.2011
pawn Код:
public OnPlayerUpdate(playerid)
{
new vehicleid,Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,speed_string[256],final_speed_int;
vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid != 0)
{
GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
final_speed_int = floatround(final_speed,floatround_round);
format(speed_string,256,"Speed: %i",final_speed_int);
TextDrawSetString(SPEEDOS[playerid], speed_string);
}
else
{
TextDrawSetString(SPEEDOS[playerid], " ");
}
if(GetPVarInt(playerid, "EventKizla") == 1 && !IsPlayerInAnyVehicle(playerid))
{
GameTextForPlayer(playerid, "~r~STUNT FAJL", 3000, 4);
SetPVarInt(playerid,"Stunt1",0);
SetPVarInt(playerid,"Stunt2",0);
SetPVarInt(playerid,"Stunt3",0);
SetPVarInt(playerid,"Stunt4",0);
SetPVarInt(playerid,"Stunt5",0);
SetPVarInt(playerid,"Stunt6",0);
SetPVarInt(playerid, "EventKizla", 0);
DisablePlayerCheckpoint(playerid);
}
return 1;
}
Try this