dont spawn at my location -
truckingserver - 17.08.2014
Thats a part of dialog resposnse.
Код:
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""#COL_ORANGE":: "#COL_WHITE"Register" , "\t\t"#COL_EASY"Blank Gamemode "#COL_DGREEN"Y_INI "#COL_EASY"(V1)\n\n"#COL_RED"You have entered a invalid password\n"#COL_WHITE"You are not registered, \nPlease enter a password below to register your account!", "Register", "Exit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_Close(File);
SetSpawnInfo( playerid, 0, 60, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
SpawnPlayer(playerid);
SetPlayerPos(playerid, -1986.3900,138.9044,27.6875);
SetPlayerFacingAngle( playerid, 90 );
TogglePlayerSpectating(playerid, true);
InterpolateCameraPos(playerid, -2248.6000976563, 493.79998779297, 454.5, -2057, 321.20001220703, 104.90000152588, 10000, CAMERA_MOVE);
InterpolateCameraLookAt(playerid, 0.0, 0.0, 0.0, -900.0, -900.0, -900.0, 10000, CAMERA_MOVE);
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"{FF9900}» {FFFFFF}Pradėdami ћaidimą turėsite 5000 Litų");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"{FF9900}» {FFFFFF}Uћ љią sumą patartina iљsilaikyti teises bei nusipirkti telefoną");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"{FF9900}» {FFFFFF}Viską rasite paraљę {FF9900}/GPS");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"{FF9900}» {FFFFFF}Sėkmės!");
SendClientMessage(playerid,COLOR_WHITE,""#COL_LOGIN"");
GivePlayerMoney(playerid, 5000);
SetTimerEx("Cameraa", 11000, false, "i", playerid);
And thats what should i got after Timer
Код:
TogglePlayerSpectating(playerid, false);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid, -1986.3900,138.9044,27.6875);
SetPlayerSkin(playerid, 60);
ShowPlayerDialog(playerid, DIALOG_LYTIS, DIALOG_STYLE_LIST,""#COL_ORANGE"LYTIES PASIRINKIMAS" , "VAIKINAS \nMERGINA", "Rinktis", "");
return 1;
Everything seems to be working fine only SetPlayerPos(playerid, -1986.3900,138.9044,27.6875); after timer does not set my position
Re: dont spawn at my location -
MicroD - 17.08.2014
I have no idea why are you making a timer because you already have those things in code.
SetSpawnInfo( playerid, 0, 60, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );//This will set the spawn info and is safer than SetPlayerPos on spawn.
SpawnPlayer(playerid);//spawns player