Setting character spawn after making a character
#1

I have this for multiple Spawn Point's:
pawn Код:
if(Character[playerid][SpawnPoint] == 1) //North Caravan Park
        {
            TogglePlayerSpectating(playerid, false);
            if(Character[playerid][ClothesUsed] == 1)
            {
                SetSpawnInfo(playerid, 0, Character[playerid][Clothes1], 765.9069,361.9311,20.8550,174.3097, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
               
                if(Character[playerid][Faction] == 1)
                {
                    SetPlayerArmour(playerid, 100);
                }
                if(Character[playerid][Faction] == 2)
                {
                    GivePlayerWeapon(playerid, 42, 99999);
                }
                SetPlayerArmedWeapon(playerid, 0);
            }
            else if(Character[playerid][ClothesUsed] == 2)
            {
                SetSpawnInfo(playerid, 0, Character[playerid][Clothes2], 765.9069,361.9311,20.8550,174.3097, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
               
                if(Character[playerid][Faction] == 1)
                {
                    SetPlayerArmour(playerid, 100);
                }
                if(Character[playerid][Faction] == 2)
                {
                    GivePlayerWeapon(playerid, 42, 99999);
                }
                SetPlayerArmedWeapon(playerid, 0);
            }
            else if(Character[playerid][ClothesUsed] == 3)
            {
                SetSpawnInfo(playerid, 0, Character[playerid][Clothes3], 765.9069,361.9311,20.8550,174.3097, 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);
               
                if(Character[playerid][Faction] == 1)
                {
                    SetPlayerArmour(playerid, 100);
                }
                if(Character[playerid][Faction] == 2)
                {
                    GivePlayerWeapon(playerid, 42, 99999);
                }
                if(Character[playerid][Faction] == 3)
                {
                    GivePlayerWeapon(playerid, 43, 20);
                }
                SetPlayerArmedWeapon(playerid, 0);
            }
        }
How do I add it to make them spawn at a specific location, after making a character.

I tried :
pawn Код:
SetSpawnInfo(playerid, 0, Character[playerid][Clothes1], Character[playerid][SpawnPoint] == 4, 0, 0, 0, 0, 0, 0);
Reply
#2

Set spawn info and then set 100 - 200ms timer to spawn him. I assume you're in class selection at that point.
Within timer callback use SpawnPlayer(playerid);
Reply
#3

SetSpawnInfo to what?
Reply
#4

Both.
When account is created then set 100 ms timer, after which player will be spawned using SpawnPlayer(playerid);
Reply
#5

This should work.. But no.

pawn Код:
new query[64];
                CreateCharacter(playerid, //2517
                GetPVarStringEx(playerid, "TEMP_C_NAME"),
                format(query, sizeof(query), "UPDATE `PlayerCharacter` WHERE `SpawnPoint` =%s", Character[playerid][SpawnPoint]);
               
                /*Settings[sDEFAULT_P_X],
                Settings[sDEFAULT_P_Y],
                Settings[sDEFAULT_P_Z],
                Settings[sDEFAULT_P_ANGLE],
                Settings[sDEFAULT_P_WORLD],
                Settings[sDEFAULT_P_INTERIOR],
                Settings[sDEFAULT_P_CASH],
                Settings[sDEFAULT_P_BANK],
                Settings[sDEFAULT_P_SKIN]);*/

                DeletePVar(playerid, "TEMP_C_NAME");
                ShowMenuDialog(playerid);

pawn Код:
MyProject.pwn(2526 -- 2528) : error 001: expected token: ",", but found ";"
Reply
#6

seriously?
Код:
 CreateCharacter(playerid, //2517
                GetPVarStringEx(playerid, "TEMP_C_NAME"),
Why don't you finish your function, end it with semicollon and then try?
Reply
#7

It's not that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)