What is the solution to my problem?
#1

sa-mp-016.jpg

I somehow managed to Auto-spawn a player without pressing the spawn Button

but tere is one little problem

the Player wont move on my first spawn it will freze all my controled keys mean wile when i restart my server with the RCON [Remote Console] and Login as admin and restart the server it auto spawns with no problem.
Reply
#2

TogglePlayerControllable maybe?
Reply
#3

Quote:
Originally Posted by mirou123
View Post
TogglePlayerControllable maybe?
can u show me an example or can you tell me that nativ function his parameters and on witch callback to put
Reply
#4

https://sampwiki.blast.hk/wiki/Function:...erControllable

TogglePlayerControllable(playerid, true) when the player spawns.
Reply
#5

Can you show us your OnPlayerSpawn function?
Reply
#6

nvm.
Reply
#7

Pre-tested in other gamemode and its a success i spawned a player without a login system

Quote:

public OnPlayerConnect(playerid)
{
SetPlayerColor(playerid, COLOR_NORMAL_PLAYER);
GameTextForPlayer(playerid, "~r~San ~w~Fiero ~b~Freeroam", 6000, 6);
TogglePlayerSpectating(playerid, 0);

SetSpawnInfo(playerid, 0, 1, -1417.6431, -295.8919, 14.1484, 139.6040, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);

return 1;
}

and

Quote:

public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}

it works perfect
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)