Weird problem
#1

Hi,

So what i did is i made a system in which we will spawn from where we logged out. The problem is that we spawn and i get a mouse cursor on screen and i can't control anything no hud no status bar. I tried messing with TogglePlayerSpectating but that didn't helped. Onplayerspawn code
Код:
pInfo[playerid][Spawned] = 1;
		    if(pInfo[playerid][Registered] == 1 && pInfo[playerid][Logged] == 0)
		    {
		       ShowPlayerDialog(playerid, JDIALOGS+45, DIALOG_STYLE_MSGBOX,"     {FB0404}Kicked", "You have been kicked | Reason: \"You must be logged before spawn\"", "Ok", "");
		       Timer[playerid] = SetTimerEx("KickPlayer",100,false,"d", playerid);
		       return 0;
		    }
		    if(pInfo[playerid][yep] == 1)
			{
       			SetPlayerPos(playerid,pInfo[playerid][Xpos],pInfo[playerid][Ypos],pInfo[playerid][Zpos]);
			    SetPlayerVirtualWorld(playerid,pInfo[playerid][pWorld]);
			    SetPlayerInterior(playerid,pInfo[playerid][pInt]);
			    SetTimerEx("UnfreezePlayer", 2000, false, "d", playerid);
			    SetPlayerSkin(playerid,pInfo[playerid][Skin]);
			    TogglePlayerControllable(playerid, 0);
			    TogglePlayerSpectating(playerid, 0);
			    if (!AlreadyGiveWeapons[playerid]) SetTimerEx("LoadWeaponsToFile",250,false,"i",playerid);
			    if(pInfo[playerid][gTeam] == ROBBERS)
   				{
					   SetPlayerSkin(playerid,pInfo[playerid][Skin]);
				}
				SetPlayerWantedLevelEx(playerid,pInfo[playerid][pWantedLevel]);
			}
			else
			{
				TogglePlayerControllable(playerid, 0);
			    SetTimerEx("UnfreezePlayer", 2000, false, "d", playerid);
	   			PlayerTextDrawHide(playerid, Textdraw0[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw1[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw2[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw3[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw4[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw5[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw6[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw7[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw8[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw9[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw10[playerid]);
			    PlayerTextDrawHide(playerid, Textdraw11[playerid]);
			    pInfo[playerid][Spawned]   = 0;
				if(pInfo[playerid][gTeam] == ROBBERS)
				{
						new Random = random(sizeof(RandomSpawns));
						SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
				        GivePlayerWeapon(playerid, 24, 250);
				        GivePlayerWeapon(playerid, 29, 100);
				        GivePlayerWeapon(playerid, 5, 1);
				    	SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
				        SetPlayerSkin(playerid, pInfo[playerid][Skin]);
				        SetPlayerTeam(playerid, NO_TEAM);
			    }
				if(pInfo[playerid][gTeam] == LSPD)
				{
					  	SetPlayerSkin(playerid, skins2[random(5)]);
					   	GivePlayerWeapon(playerid, 3, 1);
					   	SetPlayerPos(playerid,1568.0939, -1693.9727, 5.8906);
					   	GivePlayerWeapon(playerid, 25, 100);
					   	GivePlayerWeapon(playerid, 24, 250);
					   	SetPlayerTeam(playerid, 1);
				}
				if(pInfo[playerid][gTeam] == FBI)
				{
						SetPlayerColor(playerid, COLOR_LIGHTBLUE);
				        SetPlayerInterior(playerid, 0);
						SetPlayerPos(playerid, 1667.9078,-1681.0972,21.4379);
				        GivePlayerWeapon(playerid, 22, 100);
				        GivePlayerWeapon(playerid, 29, 100);
				    	SetPlayerFacingAngle(playerid, 177.7487);
				        SetPlayerSkin(playerid, 286);
				        SetPlayerTeam(playerid, 1);

				}
				if(pInfo[playerid][gTeam] == SWAT)
				{
			 	        SetPlayerInterior(playerid, 0);
						SetPlayerPos(playerid, 759.6467,-1357.8412,13.5183);
				        GivePlayerWeapon(playerid, 27, 100);
				        GivePlayerWeapon(playerid, 31, 100);
				        GivePlayerWeapon(playerid, 17, 5);
				    	SetPlayerFacingAngle(playerid, 258.4014);
				        SetPlayerSkin(playerid, 285);
				        SetPlayerTeam(playerid, 1);
				}
				if(pInfo[playerid][gTeam] == Army)
				{
				 		SetPlayerInterior(playerid, 0);
						SetPlayerPos(playerid, 887.4954,-1234.8975,16.4500);
				        GivePlayerWeapon(playerid, 31, 100);
				        GivePlayerWeapon(playerid, 16, 5);
				        GivePlayerWeapon(playerid, 27, 150);
				    	SetPlayerFacingAngle(playerid, 271.4659);
				        SetPlayerSkin(playerid, 287);
				        SetPlayerTeam(playerid, 1);
				}
				if(pInfo[playerid][gTeam] == Terrorist)
				{
				 		SetPlayerInterior(playerid, 0);
						SetPlayerPos(playerid, 2492.4568,-952.1381,82.2434);
				        GivePlayerWeapon(playerid, 22, 100);
				        GivePlayerWeapon(playerid, 18, 5);
				        GivePlayerWeapon(playerid, 25, 150);
				        GivePlayerWeapon(playerid, 30, 150);
				    	SetPlayerFacingAngle(playerid, 274.1972);
				        SetPlayerSkin(playerid, 143);
				        SetPlayerTeam(playerid, NO_TEAM);
				}
		    }
		    SCM(playerid,COLOR_PINK,"[INFO]: Type /cmds to see all the cmds and read /rules to avoid breaking our community's rules.");
			return 1;
}
Reply
#2

Press ESC or Open the chat, no? Can you post a screen of your problem? '-'
Reply
#3

It's really weird. The mouse arrow won't come up in screenshots. Anyway here is the image A black big mouse comes up on screen. But dunno it isn't coming up in screenshots.
Reply
#4

anyone?
Reply
#5

Код:
TogglePlayerControllable(playerid, 0);
To:

Код:
TogglePlayerControllable(playerid, 1);
or remove it.
Reply
#6

I already tried setting them. Even tried removing but didn't helped
Reply
#7

Anyone?
Reply
#8

Please help
Reply
#9

Fixed
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)