What's up?
#1

pawn Код:
{
        format(string,sizeof(string),"Admin Level: %i | Player Level: %i | XP Points: %d | Faction: Civilian(n/a)", Player[playerid][AdminLevel], Player[playerid][Level], Player[playerid][ExperiencePoints]);
        SendClientMessage(playerid, LIBLUE, string);
        KillTimer(TutorialCameraTimer[playerid]);
        if(Player[playerid][SpawnPoint] == 1) //North Caravan Park
        {
            TogglePlayerSpectating(playerid, false);
            if(Player[playerid][ClothesUsed] == 1)
            {
                print("Working");
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes1], 765.9069,361.9311,20.8550,174.3097, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
            }
            else if(Player[playerid][ClothesUsed] == 2)
            {
                print("Working");
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes2], 765.9069,361.9311,20.8550,174.3097, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
            }
            else if(Player[playerid][ClothesUsed] == 3)
            {
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes3], 765.9069,361.9311,20.8550,174.3097, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
            }
        }
        else if(Player[playerid][SpawnPoint] == 2) //Blueberry Caravan Park
        {
            TogglePlayerSpectating(playerid, false);
            if(Player[playerid][ClothesUsed] == 1)
            {
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes1], 252.1177,-310.5331,1.5836,52.7107, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
            }
            else if(Player[playerid][ClothesUsed] == 2)
            {
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes2], 252.1177,-310.5331,1.5836,52.7107, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
            }
            else if(Player[playerid][ClothesUsed] == 3)
            {
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes3], 252.1177,-310.5331,1.5836,52.7107, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
            }
            SetPlayerVirtualWorld(playerid, 0);
        }
        else if(Player[playerid][SpawnPoint] == 3) //Fort Carson Caravan Park
        {
            TogglePlayerSpectating(playerid, false);
            if(Player[playerid][ClothesUsed] == 1)
            {
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes1], -63.8390,952.9380,19.8695,105.5532, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
                SetPlayerVirtualWorld(playerid, 0);
            }
            else if(Player[playerid][ClothesUsed] == 2)
            {
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes2], -63.8390,952.9380,19.8695,105.5532, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
                SetPlayerVirtualWorld(playerid, 0);
            }
            else if(Player[playerid][ClothesUsed] == 3)
            {
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes3], -63.8390,952.9380,19.8695,105.5532, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
                SetPlayerVirtualWorld(playerid, 0);
            }
        }
        else if(Player[playerid][SpawnPoint] == 4) //Montgomery Caravan Park
        {
            TogglePlayerSpectating(playerid, false);
            if(Player[playerid][ClothesUsed] == 1)
            {
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes1], 1284.0914,168.3455,20.4620,354.0366, 0, 0, 0, 0, 0, 0);
                SetPlayerVirtualWorld(playerid, 0);
                SpawnPlayer(playerid);
            }
            else if(Player[playerid][ClothesUsed] == 2)
            {
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes2], 1284.0914,168.3455,20.4620,354.0366, 0, 0, 0, 0, 0, 0);
                SetPlayerVirtualWorld(playerid, 0);
                SpawnPlayer(playerid);
            }
            else if(Player[playerid][ClothesUsed] == 3)
            {
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes3], 1284.0914,168.3455,20.4620,354.0366, 0, 0, 0, 0, 0, 0);
                SetPlayerVirtualWorld(playerid, 0);
                SpawnPlayer(playerid);
            }
        }
    }
It doesn't spawn the player, or print the first two when my player's set to ClothesUsed 1 and skin to 1.

What's up?

Thanks!
Reply
#2

Use %d At all!
Reply
#3

That's not what I'm asking Kikito -.-

It works fine on that sendclientmessage.
Reply
#4

UPs, sorry then, let me take a look on the code and i'll be right back to you.
Reply
#5

Try to print before if(Player[playerid][SpawnPoint] == 1) and after it. See if its working till there.
Reply
#6

Alright, I added this:

pawn Код:
if(Player[playerid][SpawnPoint] == 1) //North Caravan Park
        {
            TogglePlayerSpectating(playerid, false);
            print("1908");
            if(Player[playerid][ClothesUsed] == 1)
            {
                print("1912");
                SetSpawnInfo(playerid, 0, Player[playerid][Clothes1], 765.9069,361.9311,20.8550,174.3097, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
            }
It printed, but not the "1912" line.
Reply
#7

Check that their variables are correctly set, such as SpawnPoint, ClothesUsed, ect. Use printf and debug the values of them.
Reply
#8

Alright, I did this:

pawn Код:
mysql_fetch_field_row(savingstring, "Clothes1"); Player[playerid][Clothes1] = strval(savingstring);
        mysql_fetch_field_row(savingstring, "Clothes2"); Player[playerid][Clothes2] = strval(savingstring);
        mysql_fetch_field_row(savingstring, "Clothes3"); Player[playerid][Clothes3] = strval(savingstring);
        mysql_fetch_field_row(savingstring, "ClothesUsed"); Player[playerid][ClothesUsed] = strval(savingstring);
    }
    mysql_free_result();
    printf("Clothes1: %d - Clothes2: %d - Clothes3: %d - ClothesUsed: %d", Player[playerid][Clothes1], Player[playerid][Clothes2], Player[playerid][Clothes3], Player[playerid][ClothesUsed]);
Which printed:

Код:
[22:14:52] Clothes1: 0 - Clothes2: 0 - Clothes3: 0 - ClothesUsed: 0
And on the SQL debug:

Код:
[22:14:52] >> mysql_fetch_field_row( Connection handle: 1 )

[22:14:52] CMySQLHandler::FetchField("Clothes1") - 

[22:14:52] >> mysql_fetch_field_row( Connection handle: 1 )

[22:14:52] CMySQLHandler::FetchField("Clothes2") - 

[22:14:52] >> mysql_fetch_field_row( Connection handle: 1 )

[22:14:52] CMySQLHandler::FetchField("Clothes3") - 

[22:14:52] >> mysql_fetch_field_row( Connection handle: 1 )

[22:14:52] CMySQLHandler::FetchField("ClothesUsed") - 

[22:14:52] >> mysql_fetch_row_format( Connection handle: 1 )

[22:14:52] >> mysql_free_result( Connection handle: 1 )
Reply
#9

They're not printing / functioning because the variables are not being set correctly then.
Reply
#10

Well, there's nothing wrong with the way that they are set in the script. Just like all of the other things on the sql section of the script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)