Players do not move.
#1

Hello, everybody!
My server is running great, although there is one issue that happens randomly.
The server can go multiple hours without it happening, or it can happen in 5 minutes. It's completely random.

Everybody stops moving on my screen, and others as well. If you teleport to them, it takes you to a position no-where near their actual character. Their coordinates still update but the actual characters don't.

I've checked out this issue on these forums and from what I can tell, it's a result of OnPlayerUpdate not returning 1 at the end. Mine does, it has return 1; at the very end of it.

Can anybody help me out with this? Any idea what could be causing it?

Nothing appears in the console.

Thanks.
Reply
#2

//I didn't read.
Reply
#3

Quote:
Originally Posted by tyler12
Посмотреть сообщение
//I didn't read.
Then gtfo. OP, how much cpu is your server using when things freeze?
Reply
#4

Quote:
Originally Posted by linuxthefish
Посмотреть сообщение
Then gtfo. OP, how much cpu is your server using when things freeze?
I'm not sure. The next time it does it, I'll take a look. Everybody can still chat and use commands fine, we just don't see each-other moving around or anything.
Reply
#5

Quote:
Originally Posted by Eric
Посмотреть сообщение
I'm not sure. The next time it does it, I'll take a look. Everybody can still chat and use commands fine, we just don't see each-other moving around or anything.
Are you sure it's everyone? If so, check if you are returning 0 in OnPlayerUpdate.
Reply
#6

Quote:
Originally Posted by linuxthefish
Посмотреть сообщение
Are you sure it's everyone? If so, check if you are returning 0 in OnPlayerUpdate.
It's everybody, I've asked them when it happens and they always complain. Also, I've checked, I'm returning 1.
Reply
#7

Is there any code at all in OnPlayerUpdate?
Reply
#8

Quote:
Originally Posted by linuxthefish
Посмотреть сообщение
Is there any code at all in OnPlayerUpdate?
Yes.

pawn Код:
public OnPlayerUpdate(playerid) {
    if(playerVariables[playerid][pTutorial] == 1) {
        new
            Keys,
            ud,
            lr;

        GetPlayerKeys(playerid, Keys, ud, lr);
        if(lr > 0) {
            if(playerVariables[playerid][pSkinCount]+1 >= sizeof(tutorialSkins)) {
                SetPlayerSkin(playerid, 0);
                playerVariables[playerid][pSkinCount] = 0;
                PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
            }
            else {
                playerVariables[playerid][pSkinCount]++;
                SetPlayerSkin(playerid, tutorialSkins[playerVariables[playerid][pSkinCount]]);
            }
        }
        else if(lr < 0) {
            if(playerVariables[playerid][pSkinCount]-1 < 0) {
                SetPlayerSkin(playerid, 0);
                playerVariables[playerid][pSkinCount] = 0;
                PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
            }
            else {
                playerVariables[playerid][pSkinCount]--;
                SetPlayerSkin(playerid, tutorialSkins[playerVariables[playerid][pSkinCount]]);
            }
        }
    }
   
    SetPlayerScore(playerid, playerVariables[playerid][pLevel]);
   
    if(IsPlayerInRangeOfPoint(playerid, 4, -2033.1531,-117.4760,1035.1719)) {
        format(szMessage, sizeof(szMessage), "~g~DMV~n~~h~Type /dmv for the licencing menu!");
        GameTextForPlayer(playerid, szMessage, 3000, 4);
    }
   
    new Float:health;
    new veh;
    veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    if(health < 450 && Engine[veh] == 1) {
        new engine,lights,alarm,doors,bonnet,boot,objective;
        GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(veh, 0, 0, alarm, doors, bonnet, boot, objective);
        format(szMessage, sizeof(szMessage), "* %s's engine sputters, and stops working.", playerVariables[GetVehicleDriver(veh)][pNormalName]);
        nearByMessage(GetVehicleDriver(veh), COLOR_PURPLE, szMessage);
        SendClientMessage(GetVehicleDriver(veh), COLOR_GREY, "You must call a mechanic to fix your vehicle before it can be used again.");
        Engine[veh] = 0;
        Lights[veh] = 0;
    }
    if(health < 250) {
        SetVehicleHealth(veh, 250.0);
    }

    if(playerVariables[playerid][pOnRequest] != INVALID_PLAYER_ID) {
        new
            Keys,
            ud,
            lr;

        GetPlayerKeys(playerid, Keys, ud, lr);

        if(lr > 0) {
            GetPlayerPos(playerVariables[playerid][pOnRequest], playerVariables[playerVariables[playerid][pOnRequest]][pPos][0], playerVariables[playerVariables[playerid][pOnRequest]][pPos][1], playerVariables[playerVariables[playerid][pOnRequest]][pPos][2]);

            SetPlayerPos(playerid, playerVariables[playerVariables[playerid][pOnRequest]][pPos][0], playerVariables[playerVariables[playerid][pOnRequest]][pPos][1], playerVariables[playerVariables[playerid][pOnRequest]][pPos][2]);
            TextDrawHideForPlayer(playerid, textdrawVariables[1]);

            SendClientMessage(playerid, COLOR_WHITE, "You have teleported to the player who has requested help.");

            playerVariables[playerid][pOnRequest] = INVALID_PLAYER_ID;
        }
        else if(lr < 0) {
            TextDrawHideForPlayer(playerid, textdrawVariables[1]);
            playerVariables[playerid][pOnRequest] = INVALID_PLAYER_ID;
        }
    }

    if(playerVariables[playerid][pTabbed] == 1) {
        playerVariables[playerid][pTabbed] = 0;
        if(playerVariables[playerid][pOutstandingWeaponRemovalSlot] >= 1) {
            if(playerVariables[playerid][pOutstandingWeaponRemovalSlot] == 40) {
                ResetPlayerWeapons(playerid);
            }
            else {
                ResetPlayerWeapons(playerid);
                playerVariables[playerid][pWeapons][playerVariables[playerid][pOutstandingWeaponRemovalSlot]] = 0;
                playerVariables[playerid][pAmmo][playerVariables[playerid][pOutstandingWeaponRemovalSlot]] = 0;
                givePlayerWeapons(playerid);
            }
            playerVariables[playerid][pAnticheatExemption] = 6;
        }
    }

    if(playerVariables[playerid][pJobSkill][0] == 1 && playerVariables[playerid][pGunsMade] == 100) {
        playerVariables[playerid][pJobSkill][1] = 2;
        SendClientMessage(playerid, COLOR_GREY, "Congratulations. Your arms dealing has leveled to 2.");
    }
    if(playerVariables[playerid][pJobSkill][0] == 2 && playerVariables[playerid][pGunsMade] == 200) {
        playerVariables[playerid][pJobSkill][1] = 3;
        SendClientMessage(playerid, COLOR_GREY, "Congratulations. Your arms dealing has leveled to 3.");
    }
    if(playerVariables[playerid][pJobSkill][0] == 3 && playerVariables[playerid][pGunsMade] == 300) {
        playerVariables[playerid][pJobSkill][1] = 4;
        SendClientMessage(playerid, COLOR_GREY, "Congratulations. Your arms dealing has leveled to 4.");
    }
    if(playerVariables[playerid][pJobSkill][0] == 4 && playerVariables[playerid][pGunsMade] == 400) {
        playerVariables[playerid][pJobSkill][1] = 5;
        SendClientMessage(playerid, COLOR_GREY, "Congratulations. Your arms dealing has leveled to 5.");
    }

    if(playerVariables[playerid][pTutorial] >= 4 && playerVariables[playerid][pTutorial] < 14 && GetPVarInt(playerid, "tutTime") > 0)
        TextDrawShowForPlayer(playerid, textdrawVariables[8]);

    if(playerVariables[playerid][pTutorial] >= 4 && playerVariables[playerid][pTutorial] < 14 && GetPVarInt(playerid, "tutTime") < 1) {
        new
            Keys,
            ud,
            lr;

        GetPlayerKeys(playerid, Keys, ud, lr);
        if(lr > 0) {
            playerVariables[playerid][pTutorial]++;
            switch(playerVariables[playerid][pTutorial]) {
                case 5: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Overview");
                    SendClientMessage(playerid, COLOR_WHITE, "This is a roleplay server, which means you act out a character as if it were real.");
                    SendClientMessage(playerid, COLOR_WHITE, "Pressing the button to open the textbox (usually T) and simply typing a message,");
                    SendClientMessage(playerid, COLOR_WHITE, "will broadcast what you've typed to the people around you as an 'IC' (in character) message.");
                    SendClientMessage(playerid, COLOR_WHITE, " ");
                    SendClientMessage(playerid, COLOR_WHITE, "Using /b and typing your message (e.g. /b hello) will enclose what you've written in double parenthesis.");
                    SendClientMessage(playerid, COLOR_WHITE, "This will broadcast your message to the people around you as an 'OOC' (out of character) message.");
                    SendClientMessage(playerid, COLOR_WHITE, " ");
                    SendClientMessage(playerid, COLOR_WHITE, "Similarly, using /o has the same purpose as /b, though this time the message will be broadcasted throughout the entire server.");

                    SetPVarInt(playerid, "tutTime", 10);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                    SendClientMessage(playerid, COLOR_YELLOW, "");
                }
                case 6: {
                    clearScreen(playerid);
                    SendClientMessage(playerid, COLOR_YELLOW, "Locations:");
                    SendClientMessage(playerid, COLOR_YELLOW, "");

                    SendClientMessage(playerid, COLOR_YELLOW, "The Bank");
                    SendClientMessage(playerid, COLOR_WHITE, "This is the place you'll want to go to make your various monetary transactions.");
                    SendClientMessage(playerid, COLOR_WHITE, "The following commands will be useful:");
                    SendClientMessage(playerid, COLOR_WHITE, "/balance, /withdraw and /deposit");

                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);

                    SetPlayerCameraPos(playerid, 608.430480, -1203.073608, 17.801227);
                    SetPlayerCameraLookAt(playerid, 594.246276, -1237.907348, 17.801227);
                    SetPlayerPos(playerid, 526.8502, -1261.1985, 16.2272-30);

                    SetPVarInt(playerid, "tutTime", 4);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                    SendClientMessage(playerid, COLOR_YELLOW, "");
                }
                case 7: {
                    SendClientMessage(playerid, COLOR_YELLOW, "The Crane");
                    SendClientMessage(playerid, COLOR_WHITE, "At the crane, you can drop off vehicles for money.");
                    SendClientMessage(playerid, COLOR_WHITE, "Use the command /dropcar to drive the vehicle to the red marker.");

                    SetPlayerCameraPos(playerid, 2637.447265, -2226.906738, 16.296875);
                    SetPlayerCameraLookAt(playerid, 2651.442626, -2227.208496, 16.296875);
                    SetPlayerPos(playerid, 2641.4473, -2226.9067, 16.2969-30);

                    SetPVarInt(playerid, "tutTime", 5);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                    SendClientMessage(playerid, COLOR_YELLOW, "");
                }
                case 8: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Los Santos Police Department");
                    SendClientMessage(playerid, COLOR_WHITE, "This is the place where you'll find police officers.");
                    SendClientMessage(playerid, COLOR_WHITE, "Inside, you should wait in lobby before being served.");
                    SendClientMessage(playerid, COLOR_WHITE, "If you want to apply to the LSPD, please visit our forum.");

                    SetPlayerCameraPos(playerid, 1495.273925, -1675.542358, 28.382812);
                    SetPlayerCameraLookAt(playerid, 1535.268432, -1675.874023, 13.382812);
                    SetPlayerPos(playerid, 2641.4473, -2226.9067, 16.2969-30);

                    SetPVarInt(playerid, "tutTime", 6);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                    SendClientMessage(playerid, COLOR_YELLOW, "");
                }
                case 9: {
                    clearScreen(playerid);
                    SendClientMessage(playerid, COLOR_YELLOW, "Jobs:");
                    SendClientMessage(playerid, COLOR_YELLOW, "");

                    SendClientMessage(playerid, COLOR_WHITE, "Having a job gives you something to do. ");
                    SendClientMessage(playerid, COLOR_WHITE, "Your job may also have a skill depending on the job you have.");
                    SendClientMessage(playerid, COLOR_WHITE, "All jobs are productive in some way.");

                    SetPVarInt(playerid, "tutTime", 2);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                    SendClientMessage(playerid, COLOR_YELLOW, "");
                }
                case 10: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Mechanic Job");
                    SendClientMessage(playerid, COLOR_WHITE, "You can find the Mechanic job near the crane at Ocean Docks.");
                    SendClientMessage(playerid, COLOR_WHITE, "A mechanic can repair vehicles, add nitrous and even repaint vehicles.");

                    SetPlayerCameraPos(playerid, 2314.167724, -2328.139892, 21.382812);
                    SetPlayerCameraLookAt(playerid, 2323.291748, -2321.122314, 13.382812);
                    SetPlayerPos(playerid, 2316.1677, -2328.1399, 13.3828-30);

                    SetPVarInt(playerid, "tutTime", 5);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                    SendClientMessage(playerid, COLOR_YELLOW, "");
                }
                case 11: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Arms Dealer Job");
                    SendClientMessage(playerid, COLOR_WHITE, "An arms dealer can smuggle parts by visiting a secret location.");
                    SendClientMessage(playerid, COLOR_WHITE, "They can then use those parts to create weapons.");
                    SendClientMessage(playerid, COLOR_WHITE, "There are five weapon levels.");
                    SendClientMessage(playerid, COLOR_WHITE, "Each level unlocks  new weapons. Every 100 weapons created levels you up.");

                    SetPlayerCameraPos(playerid, 1353.600097, -1301.909790, 19.382812);
                    SetPlayerCameraLookAt(playerid, 1361.592285, -1285.515136, 13.382812);
                    SetPlayerPos(playerid, 1351.6001, -1285.9098, 13.3828-30);

                    SetPVarInt(playerid, "tutTime", 6);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                    SendClientMessage(playerid, COLOR_YELLOW, "");
                }
                case 12: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Detective Job");
                    SendClientMessage(playerid, COLOR_WHITE, "You can find the Detective job near the bank.");
                    SendClientMessage(playerid, COLOR_WHITE, "A detective can track people, vehicles and houses");
                    SendClientMessage(playerid, COLOR_WHITE, "To track vehicles and houses, however, you'll need to level up.");
                    SendClientMessage(playerid, COLOR_WHITE, "As with the arms dealer job, there are 10 levels.");
                    SendClientMessage(playerid, COLOR_WHITE, "Every 50 searches levels you up.");

                    SetPlayerCameraPos(playerid, 622.514709, -1458.283691, 22.256816);
                    SetPlayerCameraLookAt(playerid, 612.514709, -1458.298583, 14.256817);
                    SetPlayerPos(playerid, 622.5147, -1458.2837, 14.2568-30);

                    SetPVarInt(playerid, "tutTime", 10);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
                case 13: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Levels");
                    SendClientMessage(playerid, COLOR_WHITE, "A very new feature to this script is a levels system.");
                    SendClientMessage(playerid, COLOR_WHITE, "");
                    SendClientMessage(playerid, COLOR_WHITE, "You can now gain OOC levels which will benefit you throughout the server.");
                    SendClientMessage(playerid, COLOR_WHITE, "As of present, levels don't really do much - but future updates shall introduce a bunch of new features!");
                    SendClientMessage(playerid, COLOR_WHITE, "");
                    SendClientMessage(playerid, COLOR_WHITE, "You can only level up every X hours, and it costs money from your character's bank account.");

                    SetPlayerCameraPos(playerid, 622.514709, -1458.283691, 22.256816);
                    SetPlayerCameraLookAt(playerid, 612.514709, -1458.298583, 14.256817);
                    SetPlayerPos(playerid, 622.5147, -1458.2837, 14.2568-30);

                    SetPVarInt(playerid, "tutTime", 10);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
                case 14: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Conclusion");
                    SendClientMessage(playerid, COLOR_WHITE, "Thanks for reading/watching the tutorial, your character will now spawn. ");
                    SendClientMessage(playerid, COLOR_WHITE, "If you have any questions or concerns which relate to gameplay on our server, please use "EMBED_GREY"/n"EMBED_WHITE".");
                    SendClientMessage(playerid, COLOR_WHITE, "If you wish to obtain help from an official member of staff, please use "EMBED_GREY"/helpme"EMBED_WHITE".");
                    SendClientMessage(playerid, COLOR_WHITE, "If you see any players breaking rules, please use "EMBED_GREY"/report"EMBED_WHITE".");
                   
                    format(szMessage, sizeof(szMessage), "Last, but not least, please make sure that you register on our community forums: "EMBED_GREY"%s"EMBED_WHITE".", szServerWebsite);
                    SendClientMessage(playerid, COLOR_WHITE, szMessage);
                   
                    firstPlayerSpawn(playerid);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
            }
        }
        else if(lr < 0) {
            playerVariables[playerid][pTutorial]--;

            if(playerVariables[playerid][pTutorial] < 5) {
                playerVariables[playerid][pTutorial] = 5;
                PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
            }

            switch(playerVariables[playerid][pTutorial]) {
                case 5: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Overview");
                    SendClientMessage(playerid, COLOR_WHITE, "This is a roleplay server, which means you act out a character as if it were real.");
                    SendClientMessage(playerid, COLOR_WHITE, "Pressing the button to open the textbox (usually T) and simply typing a message,");
                    SendClientMessage(playerid, COLOR_WHITE, "will broadcast what you've typed to the people around you as an 'IC' (in character) message.");
                    SendClientMessage(playerid, COLOR_WHITE, " ");
                    SendClientMessage(playerid, COLOR_WHITE, "Using /b and typing your message (e.g. /b hello) will enclose what you've written in double parenthesis.");
                    SendClientMessage(playerid, COLOR_WHITE, "This will broadcast your message to the people around you as an 'OOC' (out of character) message.");
                    SendClientMessage(playerid, COLOR_WHITE, " ");
                    SendClientMessage(playerid, COLOR_WHITE, "Similarly, using /o has the same purpose as /b, though this time the message will be broadcasted throughout the entire server.");

                    SetPVarInt(playerid, "tutTime", 10);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
                case 6: {
                    clearScreen(playerid);
                    SendClientMessage(playerid, COLOR_YELLOW, "Locations:");
                    SendClientMessage(playerid, COLOR_YELLOW, "");

                    SendClientMessage(playerid, COLOR_YELLOW, "The Bank");
                    SendClientMessage(playerid, COLOR_WHITE, "This is the place you'll want to go to make your various monetary transactions.");
                    SendClientMessage(playerid, COLOR_WHITE, "The following commands will be useful:");
                    SendClientMessage(playerid, COLOR_WHITE, "/balance, /withdraw and /deposit");

                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);

                    SetPlayerCameraPos(playerid, 608.430480, -1203.073608, 17.801227);
                    SetPlayerCameraLookAt(playerid, 594.246276, -1237.907348, 17.801227);
                    SetPlayerPos(playerid, 526.8502, -1261.1985, 16.2272-30);

                    SetPVarInt(playerid, "tutTime", 4);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
                case 7: {
                    SendClientMessage(playerid, COLOR_YELLOW, "The Crane");
                    SendClientMessage(playerid, COLOR_WHITE, "At the crane, you can drop off vehicles for money.");
                    SendClientMessage(playerid, COLOR_WHITE, "Use the command /dropcar to drive the vehicle to the red marker.");

                    SetPlayerCameraPos(playerid, 2637.447265, -2226.906738, 16.296875);
                    SetPlayerCameraLookAt(playerid, 2651.442626, -2227.208496, 16.296875);
                    SetPlayerPos(playerid, 2641.4473, -2226.9067, 16.2969-30);

                    SetPVarInt(playerid, "tutTime", 5);
                    TextDrawHideForPlayer(playerid, textdrawVariables[8]);
                }
                case 8: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Los Santos Police Department");
                    SendClientMessage(playerid, COLOR_WHITE, "This is the place where you'll find police officers.");
                    SendClientMessage(playerid, COLOR_WHITE, "Inside, you should wait in lobby before being served.");
                    SendClientMessage(playerid, COLOR_WHITE, "If you want to apply to the LSPD, please visit our forum.");

                    SetPlayerCameraPos(playerid, 1495.273925, -1675.542358, 28.382812);
                    SetPlayerCameraLookAt(playerid, 1535.268432, -1675.874023, 13.382812);
                    SetPlayerPos(playerid, 2641.4473, -2226.9067, 16.2969-30);

                    SetPVarInt(playerid, "tutTime", 6);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
                case 9: {
                    clearScreen(playerid);
                    SendClientMessage(playerid, COLOR_YELLOW, "Jobs:");
                    SendClientMessage(playerid, COLOR_YELLOW, "");

                    SendClientMessage(playerid, COLOR_WHITE, "Having a job gives you something to do. ");
                    SendClientMessage(playerid, COLOR_WHITE, "Your job may also have a skill depending on the job you have.");
                    SendClientMessage(playerid, COLOR_WHITE, "All jobs are productive in some way.");

                    SetPVarInt(playerid, "tutTime", 5);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
                case 10: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Mechanic Job");
                    SendClientMessage(playerid, COLOR_WHITE, "You can find the Mechanic job near the crane at Ocean Docks.");
                    SendClientMessage(playerid, COLOR_WHITE, "A mechanic can repair vehicles, add nitrous and even repaint vehicles.");

                    SetPlayerCameraPos(playerid, 2314.167724, -2328.139892, 21.382812);
                    SetPlayerCameraLookAt(playerid, 2323.291748, -2321.122314, 13.382812);
                    SetPlayerPos(playerid, 2316.1677, -2328.1399, 13.3828-30);

                    SetPVarInt(playerid, "tutTime", 5);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
                case 11: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Arms Dealer Job");
                    SendClientMessage(playerid, COLOR_WHITE, "An arms dealer can smuggle parts by visiting a secret location.");
                    SendClientMessage(playerid, COLOR_WHITE, "They can then use those parts to create weapons.");
                    SendClientMessage(playerid, COLOR_WHITE, "There are five weapon levels.");
                    SendClientMessage(playerid, COLOR_WHITE, "Each level unlocks  new weapons. Every 100 weapons created levels you up.");

                    SetPlayerCameraPos(playerid, 1353.600097, -1301.909790, 19.382812);
                    SetPlayerCameraLookAt(playerid, 1361.592285, -1285.515136, 13.382812);
                    SetPlayerPos(playerid, 1351.6001, -1285.9098, 13.3828-30);

                    SetPVarInt(playerid, "tutTime", 10);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
                case 12: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Detective Job");
                    SendClientMessage(playerid, COLOR_WHITE, "You can find the Detective job near the bank.");
                    SendClientMessage(playerid, COLOR_WHITE, "A detective can track people, vehicles and houses");
                    SendClientMessage(playerid, COLOR_WHITE, "To track vehicles and houses, however, you'll need to level up.");
                    SendClientMessage(playerid, COLOR_WHITE, "As with the arms dealer job, there are 10 levels.");
                    SendClientMessage(playerid, COLOR_WHITE, "Every 50 searches levels you up.");

                    SetPlayerCameraPos(playerid, 622.514709, -1458.283691, 22.256816);
                    SetPlayerCameraLookAt(playerid, 612.514709, -1458.298583, 14.256817);
                    SetPlayerPos(playerid, 622.5147, -1458.2837, 14.2568-30);

                    SetPVarInt(playerid, "tutTime", 10);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
                case 13: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Levels");
                    SendClientMessage(playerid, COLOR_WHITE, "A very new feature to this script is a levels system.");
                    SendClientMessage(playerid, COLOR_WHITE, "");
                    SendClientMessage(playerid, COLOR_WHITE, "You can now gain OOC levels which will benefit you throughout the server.");
                    SendClientMessage(playerid, COLOR_WHITE, "As of present, levels don't really do much - but future updates shall introduce a bunch of new features!");
                    SendClientMessage(playerid, COLOR_WHITE, "");
                    SendClientMessage(playerid, COLOR_WHITE, "You can only level up every X hours, and it costs money from your character's bank account.");

                    SetPlayerCameraPos(playerid, 622.514709, -1458.283691, 22.256816);
                    SetPlayerCameraLookAt(playerid, 612.514709, -1458.298583, 14.256817);
                    SetPlayerPos(playerid, 622.5147, -1458.2837, 14.2568-30);

                    SetPVarInt(playerid, "tutTime", 10);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
                case 14: {
                    SendClientMessage(playerid, COLOR_YELLOW, "Conclusion");
                    SendClientMessage(playerid, COLOR_WHITE, "Thanks for reading/watching the tutorial, your character will now spawn. ");
                    SendClientMessage(playerid, COLOR_WHITE, "If you have any questions or concerns which relate to gameplay on our server, please use "EMBED_GREY"/n"EMBED_WHITE".");
                    SendClientMessage(playerid, COLOR_WHITE, "If you wish to obtain help from an official member of staff, please use "EMBED_GREY"/helpme"EMBED_WHITE".");
                    SendClientMessage(playerid, COLOR_WHITE, "If you see any players breaking rules, please use "EMBED_GREY"/report"EMBED_WHITE".");

                    format(szMessage, sizeof(szMessage), "Last, but not least, please make sure that you register on our community forums: "EMBED_GREY"%s"EMBED_WHITE".", szServerWebsite);
                    SendClientMessage(playerid, COLOR_WHITE, szMessage);

                    firstPlayerSpawn(playerid);
                    TextDrawHideForPlayer(playerid, textdrawVariables[7]);
                }
            }
        }
    }

    if(GetPlayerState(playerid) == 2) {
        for(new v; v < MAX_SPIKES; v++) {
            if(spikeVariables[v][sPos][0] != 0 && spikeVariables[v][sPos][1] != 0 && spikeVariables[v][sPos][2] != 0) {
                if(IsVehicleInRangeOfPoint(GetPlayerVehicleID(playerid), 2.0, spikeVariables[v][sPos][0], spikeVariables[v][sPos][1], spikeVariables[v][sPos][2])) {

                    new
                        Damage[4];

                    GetVehicleDamageStatus(GetPlayerVehicleID(playerid), Damage[0], Damage[1], Damage[2], Damage[3]); // Set tires to 15 and watch 'em pop.
                    UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), Damage[0], Damage[1], Damage[2], 15);
                }
            }
        }
    }
    playerVariables[playerid][pConnectedSeconds] = gettime();
    return 1;
}
Reply
#9

check
PHP код:
TogglePlayerControllable(playeridfalse); 
OnPlayerspawn or OnPlayerUpdate
Reply
#10

Quote:
Originally Posted by _Khaled_
Посмотреть сообщение
check
PHP код:
TogglePlayerControllable(playeridfalse); 
OnPlayerspawn or OnPlayerUpdate
They're not frozen. They can still move, it just doesn't show up on anybody elses screen. Everybody stands still.
I think I may have fixed it though, we'll see.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)