Need Ideas to Repair the Float Bug | HELP
#1

Hi all

I have some float players in my game mode, i think need make a /sync command, i have try this code but nothing happened:

Код:
	if(strcmp(cmd, "/sync", true) == 0)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
SendClientMessage(playerid,COLOR_WHITE,"Spawned At Last Synced Position!");
return 1;
}
I have some Disabled Weapons with this code :

Код:
SetDisabledWeapons(44,45,38,35,37);//44=nightvision, 45=thermal 38= minigun 35=Rocket Launcher 36=Rocket Launcher 02
Need some ideas to repair the float bug plz

regards
Reply
#2

The float thing is just with certain players. It happens a lot when there are quite a few connected to the server.

Its easily solved by the player doing /kill

But the floating player doesn't always float to everyone.

They might float on your screen but not on others. But the sync command you need to get it to respawn the player.

The comand you did would just get a players position and send him a message.

I would try doing it this way...

pawn Код:
if(strcmp(cmd, "/sync", true) == 0)
{
SendClientMessage(playerid,COLOR_GREEN,"Synced!");
SpawnPlayer(playerid);
return 1;
}
Reply
#3

and player spawned on default location.... that i think:

Код:
if(!strcmp(cmdtext, "/sync", true))
{
new Float:X,Float:Y,Float:Z,Float:A;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
SpawnPlayer(playerid);
SetPlayerPos(playerid,X,Y,Z);
SetPlayerFacingAngle(playerid,A);
SendClientMessage(playerid,COLOR_WHITE,"Spawned At Last Synced Position!");
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)