Stay Withing The World Boundries Issue [Rep+]
#1

Hey Guys,
I need some help of you guys, I got an issue. When i login it keeps flashing and saying "Stay within the world boundries."
I searched how to fix it for days! but still cant find it.
OnPlayerRequestClass
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    TogglePlayerControllable(playerid, false);
    SetPlayerPos(playerid,1933.6263,-2399.9102,1201.7321);
    SetPlayerCameraPos(playerid, 1931.7674, -2417.5302, 1205.6908);
    SetPlayerCameraLookAt(playerid, 1931.7674, -2417.5202, 1200.6908);
    if(PlayerLogged[playerid] == 0)
    {
        mysql_reconnect();
        new Query[90], EscName[MAX_PLAYER_NAME];
        mysql_real_escape_string(PlayerName(playerid), EscName);
        format(Query, sizeof(Query), "SELECT * FROM `users` WHERE `username` = '%s'", EscName);
        mysql_query(Query);
        mysql_store_result();
        if(mysql_num_rows() != 0)
        {
            mysql_free_result();
            SendClientMessage(playerid, COLOR_SECURITY, "Please enter your password below to continue.");
            DisplayDialogForPlayer(playerid, 1);
            return 0;
        }
        else
        {
            mysql_free_result();
            SendClientMessage(playerid, COLOR_SECURITY, "Please enter a password below to register an account.");
            DisplayDialogForPlayer(playerid, 2);
            return 0;
        }
    }
    return 1;
}
This is for spawn
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(ChosenClass[playerid] == 0) { DisplayDialogForPlayer(playerid, 4); return 1; }
    AntiDeAMX();
    /*if(gTeam[playerid] == TEAM_PILOTS)
    {
        SetPlayerPos(x,y,z pilot);
        //SetPlayerTeamColor(playerid);
        GameTextForPlayer(playerid,"~g~Type ~r~~h~/work ~g~to start working",4000,3);
        SendClientMessage(playerid,COLOR_WHITE,"» You are a {1B8AE4}Pilot.{FFFFFF} Type {1B8AE4}/work{FFFFFF} inside of an aircraft to start working.");
        SendClientMessage(playerid,COLOR_WHITE,"» You can type {1B8AE4}/phelp {FFFFFF}for your role's commands, or type {1B8AE4}/helpFFFFFF} for general server help.");
    */

    if(WasSpectating[playerid] == 1)
    {
        PurelySpawned[playerid] = 1;
        SetPlayerInterior(playerid, tempinterior[playerid]);
        SetPlayerHealth(playerid, 100);
        SetPlayerPos(playerid, tempX[playerid], tempY[playerid], tempZ[playerid]);
        SetPlayerFacingAngle(playerid, tempA[playerid]);
        UpdateSkin(playerid);
        UpdatePlayerColour(playerid);
        return 1;
    }
    RespawnPlayer(playerid);
    return 1;
}
Hope you guys can help me,
Thanks
Reply
#2

I think it's because of your tempX, tempY, and tempZ variables. I used to have that problem before I set them as Float.

pawn Код:
new Float:tempX, Float:tempY, Float:tempZ;
Reply
#3

You must have atleast 1 AddPlayerClass in your script. https://sampwiki.blast.hk/wiki/AddPlayerClass
Reply
#4

Quote:
Originally Posted by tiernantheman
Посмотреть сообщение
You must have atleast 1 AddPlayerClass in your script. https://sampwiki.blast.hk/wiki/AddPlayerClass
I have this in my script..
pawn Код:
/*if(gTeam[playerid] == TEAM_PILOTS)
    {
        SetPlayerPos(x,y,z pilot);
        //SetPlayerTeamColor(playerid);
        GameTextForPlayer(playerid,"~g~Type ~r~~h~/work ~g~to start working",4000,3);
        SendClientMessage(playerid,COLOR_WHITE,"» You are a {1B8AE4}Pilot.{FFFFFF} Type {1B8AE4}/work{FFFFFF} inside of an aircraft to start working.");
        SendClientMessage(playerid,COLOR_WHITE,"» You can type {1B8AE4}/phelp {FFFFFF}for your role's commands, or type {1B8AE4}/helpFFFFFF} for general server help.");
    */
Btw on another script there isnt addplayerclass and it also works.
Reply
#5

Quote:
Originally Posted by se7evolution
Посмотреть сообщение
I have this in my script..
pawn Код:
/*if(gTeam[playerid] == TEAM_PILOTS)
    {
        SetPlayerPos(x,y,z pilot);
        //SetPlayerTeamColor(playerid);
        GameTextForPlayer(playerid,"~g~Type ~r~~h~/work ~g~to start working",4000,3);
        SendClientMessage(playerid,COLOR_WHITE,"» You are a {1B8AE4}Pilot.{FFFFFF} Type {1B8AE4}/work{FFFFFF} inside of an aircraft to start working.");
        SendClientMessage(playerid,COLOR_WHITE,"» You can type {1B8AE4}/phelp {FFFFFF}for your role's commands, or type {1B8AE4}/helpFFFFFF} for general server help.");
    */
Btw on another script there isnt addplayerclass and it also works.
Have you tried what I said?
Reply
#6

Quote:
Originally Posted by se7evolution
Посмотреть сообщение
I have this in my script..
pawn Код:
/*if(gTeam[playerid] == TEAM_PILOTS)
    {
        SetPlayerPos(x,y,z pilot);
        //SetPlayerTeamColor(playerid);
        GameTextForPlayer(playerid,"~g~Type ~r~~h~/work ~g~to start working",4000,3);
        SendClientMessage(playerid,COLOR_WHITE,"» You are a {1B8AE4}Pilot.{FFFFFF} Type {1B8AE4}/work{FFFFFF} inside of an aircraft to start working.");
        SendClientMessage(playerid,COLOR_WHITE,"» You can type {1B8AE4}/phelp {FFFFFF}for your role's commands, or type {1B8AE4}/helpFFFFFF} for general server help.");
    */
Thats not a player class, thats a team. Try adding a AddPlayerClass under OnGamemodeInit with the link I provided for the syntax.
Reply
#7

Quote:
Originally Posted by tiernantheman
Посмотреть сообщение
You must have atleast 1 AddPlayerClass in your script. https://sampwiki.blast.hk/wiki/AddPlayerClass
That's not true. If you don't add any classes you will spawn near the center of the map as CJ.

@ se7evolution Try updating all of your plugins and includes and recompile. I have had this problem before using mixed up plugin/include versions.
Reply
#8

Quote:
Originally Posted by iggy1
Посмотреть сообщение
That's not true. If you don't add any classes you will spawn near the center of the map as CJ.

@ se7evolution Try updating all of your plugins and includes and recompile. I have had this problem before using mixed up plugin/include versions.
Now, I get this with my new includes and plugins
Код:
SA-MP Dedicated Server
----------------------
v0.3e, ©2005-2012 SA-MP Team

[18:14:03] 
[18:14:03] Server Plugins
[18:14:03] --------------
[18:14:03]  Loading plugin: streamer
[18:14:03] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[18:14:03]   Loaded.
[18:14:03]  Loading plugin: mysql
[18:14:03]  SA:MP MySQL Plugin v2.1.1 Loaded.
[18:14:03]   Loaded.
[18:14:03]  Loading plugin: sscanf
[18:14:03] [MySQL] Thread running. Threadsafe: Yes.
[18:14:03] 

[18:14:03]  ===============================

[18:14:03]       sscanf plugin loaded.     

[18:14:03]    © 2009 Alex "******" Cole

[18:14:03]    0.3d-R2 500 Players "dnee"

[18:14:03]  ===============================

[18:14:03]   Loaded.
[18:14:03]  Loaded 3 plugins.

[18:14:03] 
[18:14:03] Filterscripts
[18:14:03] ---------------
[18:14:03]   Loading filterscript 'SpecialMaps.amx'...
[18:14:03]   Loaded 1 filterscripts.

[18:14:03] Script[gamemodes/LoF.amx]: Run time error 19: "File or function is not found"
[18:14:03] Number of vehicle models: 0
My server.cfg
Код:
echo Executing Server Config...
lanmode 0
rcon_password 4testtest
maxplayers 15
port 7777
hostname test
gamemode0 LoF 1
filterscripts SpecialMaps
plugins streamer mysql sscanf
announce 1
query 1
weburl noneyet
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
Reply
#9

Are you using threaded MYSQL queries? If not you need to be using the R6 version of the MYSQL plugin and include.
Reply
#10

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Are you using threaded MYSQL queries? If not you need to be using the R6 version of the MYSQL plugin and include.
Edit: Just tried! I am using MYSQL queries.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)