SA-MP Forums Archive
SetSpawnInfo not working ??? - 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: SetSpawnInfo not working ??? (/showthread.php?tid=632434)



SetSpawnInfo not working ??? - Cyro - 14.04.2017

Hi guys! Im scripting CNR server and i scripted dialog where you choose your team but i have problem:

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_CHOOSETEAM)
	{
	    if(response)
	    {
	        switch(listitem)
	        {
				case 0:
				{
				    SetSpawnInfo(playerid, TEAM_COPS, 266, 1543.4292,-1675.7469,13.5564, 0, 3, 0, 31, 500, 24, 200);
				    SendClientMessage(playerid, COLOR_LIGHTBLUE, "[INFO]: You are now police officer!");
				    SetPlayerTeam(playerid, TEAM_COPS);
				    SetPlayerColor(playerid, COLOR_BLUE);
				    
					SpawnPlayer(playerid);
				}
				case 1:
				{
				    SetSpawnInfo(playerid, TEAM_ROBBERS, 106, 2474.8865,-1683.4730,13.4256, 0, 30, 300, 28, 300, 24, 200);
				    SendClientMessage(playerid, COLOR_LIGHTBLUE, "[INFO]: You are now robber!");
				    SetPlayerTeam(playerid, TEAM_ROBBERS);
				    SetPlayerColor(playerid, COLOR_ORANGE);
				    
				    SpawnPlayer(playerid);
				}
	        }
	    }
	    else
	    {
	        Kick(playerid);
	    }
	}
	return 1;
}
When player spawns he have default CJ skin and no weapons... Any help?


Re: SetSpawnInfo not working ??? - GangstaSunny. - 14.04.2017

Looks fine. Print your function to be sure


Re: SetSpawnInfo not working ??? - Inceptio - 14.04.2017

Most likely you missed a part or two.

Make sure you implented skin correctly.