#1

I was just planning to make a command that would u make u synced to other players.

This is avoid that float/ health bug were others cant kill u if they are desynced to u.

so i was just wondering how to fix it?

Can some one tell me how to do it
Reply
#2

I've seen this solution before, search plz.
Reply
#3

What float/health bug?
Reply
#4

when ppl cant hit you because you are desync and you are floating
Reply
#5

I think those are called hacks.
Reply
#6

Quote:
Originally Posted by ledzep
I think those are called hacks.
No, there is a float bug in sa-mp for a long time now.
Reply
#7

Just respawn the player.
Reply
#8

Quote:
Originally Posted by //exora
Just respawn the player.
That dosen't always work.
Reply
#9

At the TOP
Код:
new Float:FaceAngle[MAX_PLAYERS];
new Float:PlayerHPP[MAX_PLAYERS];
new VehicleIDD[MAX_PLAYERS];
new ammoo[13][MAX_PLAYERS];
new Float:APP[MAX_PLAYERS];
new vehicledd[MAX_PLAYERS];
new interior[MAX_PLAYERS];
new Float:xx[MAX_PLAYERS]; 
new Float:yy[MAX_PLAYERS];
new Float:zz[MAX_PLAYERS];
new skinneg[MAX_PLAYERS];
new gun[13][MAX_PLAYERS];
new virt[MAX_PLAYERS];
Forward and public
Код:
forward SyncPlayer(playerid);
public SyncPlayer(playerid)
{
virt[playerid] = GetPlayerVirtualWorld(playerid);
interior[playerid] = GetPlayerInterior(playerid);
skinneg[playerid] = GetPlayerSkin(playerid);
GetPlayerArmour(playerid,APP[playerid]);
GetPlayerHealth(playerid,PlayerHPP[playerid]);
GetPlayerFacingAngle(playerid,FaceAngle[playerid]);
GetPlayerPos(playerid,xx[playerid],yy[playerid],zz[playerid]); 
GetPlayerWeaponData(playerid,1,gun[1][playerid],ammoo[1][playerid]); 
GetPlayerWeaponData(playerid,2,gun[2][playerid],ammoo[2][playerid]);
GetPlayerWeaponData(playerid,3,gun[3][playerid],ammoo[3][playerid]);
GetPlayerWeaponData(playerid,4,gun[4][playerid],ammoo[4][playerid]); 
GetPlayerWeaponData(playerid,5,gun[5][playerid],ammoo[5][playerid]);
GetPlayerWeaponData(playerid,6,gun[6][playerid],ammoo[6][playerid]);
GetPlayerWeaponData(playerid,7,gun[7][playerid],ammoo[7][playerid]); 
GetPlayerWeaponData(playerid,8,gun[8][playerid],ammoo[8][playerid]); 
GetPlayerWeaponData(playerid,9,gun[9][playerid],ammoo[9][playerid]);
GetPlayerWeaponData(playerid,10,gun[10][playerid],ammoo[10][playerid]); 
GetPlayerWeaponData(playerid,11,gun[11][playerid],ammoo[11][playerid]); 
GetPlayerWeaponData(playerid,12,gun[12][playerid],ammoo[12][playerid]);
if(IsPlayerInAnyVehicle(playerid)) 
{ 
vehicledd[playerid] = 1;
VehicleIDD[playerid] = GetPlayerVehicleID(playerid); 
}
SpawnPlayer(playerid); 
SetPlayerPos(playerid,xx[playerid],yy[playerid],zz[playerid]); 
SetPlayerFacingAngle(playerid,FaceAngle[playerid]);
SetPlayerHealth(playerid,PlayerHPP[playerid]); 
SetPlayerVirtualWorld(playerid,virt[playerid]); 
SetPlayerInterior(playerid,interior[playerid]); 
SetPlayerSkin(playerid,skinneg[playerid]);
SetPlayerArmour(playerid,APP[playerid]);
ResetPlayerWeapons(playerid); 
GivePlayerWeapon(playerid,gun[1][playerid],ammoo[1][playerid]); 
GivePlayerWeapon(playerid,gun[2][playerid],ammoo[2][playerid]); 
GivePlayerWeapon(playerid,gun[3][playerid],ammoo[3][playerid]);
GivePlayerWeapon(playerid,gun[4][playerid],ammoo[4][playerid]); 
GivePlayerWeapon(playerid,gun[5][playerid],ammoo[5][playerid]); 
GivePlayerWeapon(playerid,gun[6][playerid],ammoo[6][playerid]);
GivePlayerWeapon(playerid,gun[7][playerid],ammoo[7][playerid]);
GivePlayerWeapon(playerid,gun[8][playerid],ammoo[8][playerid]); 
GivePlayerWeapon(playerid,gun[9][playerid],ammoo[9][playerid]);
GivePlayerWeapon(playerid,gun[10][playerid],ammoo[10][playerid]);
GivePlayerWeapon(playerid,gun[11][playerid],ammoo[11][playerid]); 
GivePlayerWeapon(playerid,gun[12][playerid],ammoo[12][playerid]);
if(vehicledd[playerid] == 1) { PutPlayerInVehicle(playerid,VehicleIDD[playerid],1); vehicledd[playerid] = 0; }
return 1;
}
to the OnPlayerCommandText
Код:
if(strcmp(cmdtext, "/sync", true) == 0)
{
if(GetPlayerState(playerid) == 9|| GetPlayerState(playerid) == 5 || GetPlayerState(playerid) == 6 ||GetPlayerState(playerid) == 4|| GetPlayerState(playerid) == 0)
{
SendClientMessage(playerid,COLOR_YELLOW," Unable to start synchronization");
return 1;
}
SyncPlayer(playerid);
SendClientMessage(playerid,COLOR_YELLOW," Synchronization was made successfully");
return 1;
}
Reply
#10

^^^^

But when the player re-spawns it just put them in one of the GM's random spawn. I just tried to modify some thing to get it worked but it is not working, so wat to do for it?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)