[READ]Server Bugged [HELP]
#1

I don't know why but when i join my server all the players are frozen on my screen but they are moving on there screen and the other players can move...I just carn't see this.
Does Anyone know how to fix this problem?
Reply
#2

Anyone help me please
Reply
#3

First off, don't bump after 17 minutes.

Secondly, can other players see you move?

[rage]This forum requires that you wait 120 seconds between posts. Please try again in 82 seconds.[/rage]
Reply
#4

Please post your OnPlayerUpdate code.
Reply
#5

No other players carn't see me move and i carn't see them move...


OnPlayerUpdate Code.

Quote:

public OnPlayerUpdate(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
for(new i = 0; i < sizeof(SpikeInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
{
if(SpikeInfo[i][sCreated] == 1)
{
new panels, doors, lights, tires;
new carid = GetPlayerVehicleID(playerid);
GetVehicleDamageStatus(carid, panels, doors, lights, tires);
tires = encode_tires(1, 1, 1, 1);
UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
return 0;
}
}
}
}
new weaponid = GetPlayerWeapon(playerid);
if(!IsPlayerInAnyVehicle(playerid) && weaponid == 44 || weaponid == 45) //desynced nv,infared
{
new Keys, ud, lr;
GetPlayerKeys(playerid, Keys, ud, lr);
if(Keys & KEY_FIRE) return 0;
}
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
for(new i = 0; i < sizeof(SpikeInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
{
if(SpikeInfo[i][sCreated] == 1)
{
new panels, doors, lights, tires;
new carid = GetPlayerVehicleID(playerid);
GetVehicleDamageStatus(carid, panels, doors, lights, tires);
tires = encode_tires(1, 1, 1, 1);
UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
GameTextForPlayer(playerid,"~r~Spiked",4000,3);
return 0;
}
}
}
}
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
for(new i = 0; i < sizeof(SCamerasInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 20.0, SCamerasInfo[i][scX], SCamerasInfo[i][scY], SCamerasInfo[i][scZ]))
{
if(SCamerasInfo[i][scCreated] == 1 && SpeedCamera[playerid] == 0)
{
if(GetPlayerSpeed(playerid, false) > SCamerasInfo[i][scLimit])
{
new string[128];
new location[MAX_ZONE_NAME];
new model = GetVehicleModel(playerid);
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
SpeedCamera[playerid] = 15;
format(string, sizeof(string), "HQ: A [%s(%d)] has been caught speeding [%d/%d] in [%s] (CAM:%d)", vehName[model - 400], GetPlayerVehicleID(playerid), GetPlayerSpeed(playerid, false), SCamerasInfo[i][scLimit], location, SCamerasInfo[i][scTag]);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
SendRadioMessage(3, TEAM_BLUE_COLOR, string);
GameTextForPlayer(playerid,"~r~Caught speeding!",4000,3);
PlayerPlaySound(playerid, 1132, 0.0, 0.0, 0.0);
format(string, sizeof(string), "WARNING: You have been found speeding ([%d] in a [%d]MPH Zone!). The police have been notified.", GetPlayerSpeed(playerid, false), SCamerasInfo[i][scLimit]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 0;
}
}
}
}
}
new Keys, ud, lr;
GetPlayerKeys(playerid, Keys, ud, lr);
if(Keys & KEY_FIRE)
{
if(GetPlayerWeapon(playerid) == 23 && PlayerHasTazer[playerid] == 1)
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerAimingAtPlayer(playerid, i))
{
if(i == playerid) return 1;
if(GetDistanceBetweenPlayers(playerid, i) <
{
if(PlayerCuffed[i]) return 1;
if(IsACop(i)) return SendClientMessage(playerid, COLOR_GREY, " Cannot Tazer Cops / FBI / SASD !");
if(IsPlayerInAnyVehicle(i)) return SendClientMessage(playerid, COLOR_GREY, " Get the suspect out of the vehicle !");
if(TazerTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, " Please wait while your tazer recharges!");
new string[128];
TogglePlayerControllable(i, 0);
format(string, sizeof(string), "* You were Tazed by %s for 8 seconds.", PlayerName(playerid));
SendClientMessage(i, COLOR_LIGHTBLUE, string);
if(PlayerInfo[i][pMask] == 1)
{
format(string, sizeof(string), "* You Tazed A Stranger for 8 seconds.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s shoots with his Tazer at A Stranger, and tazed him.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
else
{
format(string, sizeof(string), "* You Tazed %s for 8 seconds.",PlayerName(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s shoots with his Tazer at %s, and tazed him.", PlayerName(playerid),PlayerName(i));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
SetTimerEx("TazerTimer", 8000, false, "i", playerid);
TazerTime[playerid] = 1;
GameTextForPlayer(i, "~r~Tazed", 2500, 3);
PlayerCuffed[i] = 1;
PlayerCuffedTime[i] = 8;
ApplyAnimation(i, "PED","FLOOR_hit_f", 4.0, 1, 0, 0, 0, 0);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are too far away from the suspect !");
return 1;
}
}
}
}
}

Reply
#6

You have to return 1 at the end of the callback or nothing will be synced.
Reply
#7

You are also returning zero at least twice in that code, ALWAYS return 1 in OPU, otherwise you desync every player (when they are streamed in at least)

Always always always return 1 in OnPlayerUpdate.

Returning 1 will still "halt" the callback so if thats what you're intending to do with return 0, it's the same - just by keeping your players synced also.
Reply
#8

Ok I have changed the onplayerupdate and it still has the players frozen can someone help me again?
Reply
#9

Can anyone please help
Reply
#10

Didn't you read what funky said? You don't have to bump so often.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)