Stay within world bounds + "Loading" - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Stay within world bounds + "Loading" (
/showthread.php?tid=269488)
Stay within world bounds + "Loading" -
KfirRP - 16.07.2011
After logging in, when it should bring you to spawn, it writes some pixel loading and Stay within world bounds.
The important publics:
Код:
public OnPlayerConnect(playerid)
{
new string[256];
GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "Users/%s.txt", plname);
SendClientMessage(playerid, -1, ""#COLOR_YELLOW"[SYSTEM] "#COLOR_WHITE" The system is searching for you file at database, please be patience.");
if(!dini_Exists(string))
{
OnPlayerRegister(playerid, 0);
}
if(dini_Exists(string))
{
SetTimerEx("OnPlayerLogin", 2000, 0, "d", playerid);
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -68.4606,1221.7789,22.4403);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(Logged[playerid] == 0) return 0;
return 1;
}
My server cfg:
Код:
echo Executing Server Config...
lanmode 0
rcon_password 7777
maxplayers 30
port 7777
hostname SA-MP 0.3c Server
gamemode0 fcrp 1
filterscripts animlist
announce 0
query 1
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
Re: Stay within world bounds + "Loading" -
Setkus - 16.07.2011
Try to delete SetPlayerWorldBounds(playerid, // your cordinations); or change the cordinations
Re: Stay within world bounds + "Loading" -
Kalcor - 16.07.2011
An SA-MP gamemode requires at least one AddPlayerClass() line.
Re: Stay within world bounds + "Loading" -
KfirRP - 17.07.2011
Setkus, I don't have any SetPlayerWorldBounds in my gamemode.
Kalcor, that's wierd, I had one without AddPlayerClass, but okay, I will add it. I'll update if it works or not!
Kalcor was right. I didn't have any AddPlayerClass, now I added one, it fixed it. Thank you.