Jump to content
  • 0

Help Script Spawn Time


Question

Posted

Problemă întâlnită (descriere):

Pai am incercat sa fac un script atunci cand dau pe buton-ul SPAWN sa imi apara un text
ex:

GameTextForPlayer(playerid, "~b~Please ~r~Waitn ~y~for spawned", 1000, 4);

Ero(area / rile) / warning-(ul / urile):!!
Liniile de cod / sursa / script-ul:Pai am facut asa

public OnPlayerSpawn(playerid)
{
	SetPlayerInterior(playerid,0);
	TogglePlayerClock(playerid,0);
	SetTimer("spawntime", 1000, false);
	return 1;
}
forward spawntime(playerid);
public spawntime(playerid)
{
    SetPlayerCameraPos(playerid, 349.8070, 1670.6421, 108.7149);
    SetPlayerCameraLookAt(playerid, 349.2492, 1671.4767, 108.3148);
	{
	  GameTextForPlayer(playerid, "~b~Please ~r~Waitn ~y~for spawned", 1000, 4);
    }
   	SpawnPlayer(playerid);
}

Imagini / Video (optional):!!!
Aţi încercat să rezolvaţi singur?:Nu stiu ce are da

APP: Dar atunci cand dau SPAWN sta ce sta dupa incepe sa imi dea spawn eu vreau imd dupa ce am dat SPAWN sa imi puna camera pe cordonatele de mai sus si sa apara text-u iar dupa sa imi dea spawn dar sa nu imi dea iara spawn o singura data  help?

9 answers to this question

Recommended Posts

Posted
public OnPlayerSpawn(playerid)
{
    if(firstspawn[playerid] == 0)
    {
SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
SetTimerEx("spawntime", 2000, 0, "i", playerid);
GameTextForPlayer(playerid, "~b~Please ~r~Waitn ~y~for spawned", 2000, 4);
}
    return 1;
}
 
forward spawntime(playerid);
 
public spawntime(playerid)
{
    SetPlayerCameraPos(playerid, 349.8070, 1670.6421, 108.7149);
    SetPlayerCameraLookAt(playerid, 349.2492, 1671.4767, 108.3148);
    SetSpawnInfo(playerid, 0, 0, 349.8070, 1670.6421, 108.7149, 0,0,0,0,0,0); // ---
firstspawn[playerid] = 1;
    SpawnPlayer(playerid);
    return 1;
}
 
si pui
 
firstspawn[playerid] = 0; la OnPlayerConnect
 
si definesti in gamemode new firstspawn[MAX_PLAYERS];

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted
public OnPlayerSpawn(playerid)
{
	SetPlayerInterior(playerid,0);
	TogglePlayerClock(playerid,0);
	SetTimerEx("spawntime", 2000, 1, "i", playerid);
	return 1;
}

forward spawntime(playerid);

public spawntime(playerid)
{
    SetPlayerCameraPos(playerid, 349.8070, 1670.6421, 108.7149);
    SetPlayerCameraLookAt(playerid, 349.2492, 1671.4767, 108.3148);
	GameTextForPlayer(playerid, "~b~Please ~r~Waitn ~y~for spawned", 2000, 4);
   	SpawnPlayer(playerid);
	return 1;
}

"Mulţi programatori buni fac programare nu pentru că se aşteaptă să câştige bani sau să fie lăudaţi de public, ci pentru că e amuzant să programezi." - Linus Torvalds

Posted


public OnPlayerSpawn(playerid)
{
	SetPlayerInterior(playerid,0);
	TogglePlayerClock(playerid,0);
	SetTimerEx("spawntime", 2000, 1, "i", playerid);
	return 1;
}

forward spawntime(playerid);

public spawntime(playerid)
{
    SetPlayerCameraPos(playerid, 349.8070, 1670.6421, 108.7149);
    SetPlayerCameraLookAt(playerid, 349.2492, 1671.4767, 108.3148);
	GameTextForPlayer(playerid, "~b~Please ~r~Waitn ~y~for spawned", 2000, 4);
   	SpawnPlayer(playerid);
	return 1;
}

Deci dau SPAWN dupa incepe sa imi dea spawn spawn spawn pana am luat crash eu vreau o singura data sa imi dea spawn nu intruna :( + nu se pune camera pe pozitia aia.

Posted

Da luai crash pentru ca cel ce ti-a facut functia, nu stia sa o foloseasca.

 

Asta e cea buna

 

public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid,0);
    TogglePlayerClock(playerid,0);
    SetTimerEx("spawntime", 2000, 0, "i", playerid);

    GameTextForPlayer(playerid, "~b~Please ~r~Waitn ~y~for spawned", 2000, 4);
    return 1;
}

forward spawntime(playerid);

public spawntime(playerid)
{
    SetPlayerCameraPos(playerid, 349.8070, 1670.6421, 108.7149);
    SetPlayerCameraLookAt(playerid, 349.2492, 1671.4767, 108.3148);
    SpawnPlayer(playerid);
    return 1;
}

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted

Da luai crash pentru ca cel ce ti-a facut functia, nu stia sa o foloseasca.

 

Asta e cea buna

 

public OnPlayerSpawn(playerid)

{

    SetPlayerInterior(playerid,0);

    TogglePlayerClock(playerid,0);

    SetTimerEx("spawntime", 2000, 0, "i", playerid);

    GameTextForPlayer(playerid, "~b~Please ~r~Waitn ~y~for spawned", 2000, 4);

    return 1;

}

forward spawntime(playerid);

public spawntime(playerid)

{

    SetPlayerCameraPos(playerid, 349.8070, 1670.6421, 108.7149);

    SetPlayerCameraLookAt(playerid, 349.2492, 1671.4767, 108.3148);

    SpawnPlayer(playerid);

    return 1;

}

La fel imi da spawn in truna dupa ce trece accel timp...

Posted
public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid,0);
    TogglePlayerClock(playerid,0);
    SetTimerEx("spawntime", 2000, 0, "i", playerid);
GameTextForPlayer(playerid, "~b~Please ~r~Waitn ~y~for spawned", 2000, 4);
    return 1;
}

forward spawntime(playerid);

public spawntime(playerid)
{
SetPlayerCameraPos(playerid, 349.8070, 1670.6421, 108.7149);
SetPlayerCameraLookAt(playerid, 349.2492, 1671.4767, 108.3148);
SetSpawnInfo(playerid, 0, 0, 349.8070, 1670.6421, 108.7149, 0,0,0,0,0,0); // ---
SpawnPlayer(playerid);
    return 1;
}

"Mulţi programatori buni fac programare nu pentru că se aşteaptă să câştige bani sau să fie lăudaţi de public, ci pentru că e amuzant să programezi." - Linus Torvalds

Posted


public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid,0);
    TogglePlayerClock(playerid,0);
    SetTimerEx("spawntime", 2000, 0, "i", playerid);
GameTextForPlayer(playerid, "~b~Please ~r~Waitn ~y~for spawned", 2000, 4);
    return 1;
}

forward spawntime(playerid);

public spawntime(playerid)
{
SetPlayerCameraPos(playerid, 349.8070, 1670.6421, 108.7149);
SetPlayerCameraLookAt(playerid, 349.2492, 1671.4767, 108.3148);
SetSpawnInfo(playerid, 0, 0, 349.8070, 1670.6421, 108.7149, 0,0,0,0,0,0); // ---
SpawnPlayer(playerid);
    return 1;
}

La fel imi da spawn.

Posted

 

public OnPlayerSpawn(playerid)
{
    if(firstspawn[playerid] == 0)
    {
SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
SetTimerEx("spawntime", 2000, 0, "i", playerid);
GameTextForPlayer(playerid, "~b~Please ~r~Waitn ~y~for spawned", 2000, 4);
}
    return 1;
}
 
forward spawntime(playerid);
 
public spawntime(playerid)
{
    SetPlayerCameraPos(playerid, 349.8070, 1670.6421, 108.7149);
    SetPlayerCameraLookAt(playerid, 349.2492, 1671.4767, 108.3148);
    SetSpawnInfo(playerid, 0, 0, 349.8070, 1670.6421, 108.7149, 0,0,0,0,0,0); // ---
firstspawn[playerid] = 1;
    SpawnPlayer(playerid);
    return 1;
}
 
si pui
 
firstspawn[playerid] = 0; la OnPlayerConnect
 
si definesti in gamemode new firstspawn[MAX_PLAYERS];

 

Multumesc

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.