PDA

View Full Version : Choosing a spawn


Sturra
05/07/2014, 01:10 PM
Hey,

I wanted to ask how to make this system. When player is coming first time to my server then this dialog pops up after login and asks "Where do you want spawn?"

1) Fort Carson
2) Blueberry
3) Dillimore

... and if his choosing let's take example Fc then his spawning in Fort Carson.


if(TutTime[i] >= 1)
{
TutTime[i] += 1;
if(TutTime[i] == 1)
{
ClearChatbox(i, 10);
SetPlayerInterior(i, 3);
SetPlayerPos(i, 330.6825,163.6688,1014.1875);
SetCameraBehindPlayer(i);
SetPlayerVirtualWorld(i, 0);
SendClientMessage(i, COLOR_YELLOW, ":: REGISTEERIMISKESKUS ::");
SendClientMessage(i, COLOR_WHITE, " ");
SendClientMessage(i, COLOR_YELLOW2, "Täname et registeerusite siin serveris.");
SendClientMessage(i, COLOR_YELLOW2, "Ära unusta muidugi serveri reegleid!");
SendClientMessage(i, COLOR_YELLOW2, "Loodame ,et saad häid mänguelamusi siin serveis!");
}
else if(TutTime[i] == 8)
{
ClearChatbox(i, 10);
SendClientMessage(i, COLOR_YELLOW2, "Tere tulemast San Fierrosse.");
SendClientMessage(i, COLOR_GRAD1, "Vihje: Et kutsuda Taksot või bussi /helista 444 või /helista 222");
SendClientMessage(i, COLOR_GRAD1, "Vihje: Kui tahad riided vahetada siis mine riidepoodi.");
SendClientMessage(i, COLOR_GRAD1, " ");
TutTime[i] = 0; PlayerInfo[i][pTut] = 1;
gOoc[i] = 0; gNews[i] = 0; gFam[i] = 0;
TogglePlayerControllable(i, 1);
MedicBill[i] = 0;
SafeGivePlayerMoney(i, 1000);
AfterTutorial[i] = 1;
SetTimerEx("UnsetAfterTutorial", 2500, false, "i", i);
SetTimerEx("UnsetFirstSpawn", 5000, false, "i", i);
SetPlayerSpawn(i);
SetPlayerInterior(i, 0);
PlayerInfo[i][pInt] = 0;
SetPlayerPos(i, -1702.8375,1340.5825,7.1797);
}
}


Hope you can help! :)
Regards, Sturra.

rickisme
05/07/2014, 01:38 PM
new Float:spawnPos[][4] =
{
//(X, Y, Z and Facing Angle)
{0, 0, 0, 0}, // city a
{1, 1, 1, 1}, // city b
{2, 2, 2, 2}, // city c
};
//OnPlayerSpawn
if(IsFirstTimeSpawn(playerid))
{
return ShowPlayerDialog(playerid, city_dialog, DIALOG_STYLE_LIST, "Choose your city", "city a\ncity b\ncity c", "Spawn", ""):
}
//OnDialogResponse
if(dialogid == city_dialog)
{
if(response)
{
SetPlayerPos(playerid, spawnPos[listitem][0], spawnPos[listitem][1], spawnPos[listitem][2]);
SetPlayerFacingAngle(playerid, spawnPos[listitem][3]);
}
}

Sturra
05/07/2014, 04:35 PM
F:\Users\Kasutaja\Desktop\ServeriFailid\gamemodes\ dlrp.pwn(1190) : warning 213: tag mismatch
F:\Users\Kasutaja\Desktop\ServeriFailid\gamemodes\ dlrp.pwn(1191) : warning 213: tag mismatch
F:\Users\Kasutaja\Desktop\ServeriFailid\gamemodes\ dlrp.pwn(1192) : warning 213: tag mismatch
F:\Users\Kasutaja\Desktop\ServeriFailid\gamemodes\ dlrp.pwn(1193) : error 029: invalid expression, assumed zero
F:\Users\Kasutaja\Desktop\ServeriFailid\gamemodes\ dlrp.pwn(1193) : error 008: must be a constant expression; assumed zero
F:\Users\Kasutaja\Desktop\ServeriFailid\gamemodes\ dlrp.pwn(3041) : error 017: undefined symbol "city_dialog"
F:\Users\Kasutaja\Desktop\ServeriFailid\gamemodes\ dlrp.pwn(6218) : error 017: undefined symbol "IsFirstTimeSpawn"
F:\Users\Kasutaja\Desktop\ServeriFailid\gamemodes\ dlrp.pwn(6220) : error 017: undefined symbol "city_dialog"
F:\Users\Kasutaja\Desktop\ServeriFailid\gamemodes\ dlrp.pwn(6220) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


I getting these kind of error's. :/