[Ajuda] ajudem com spawn random / salvamento
#7

Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
PHP код:
public OnPlayerSpawn(playerid)
{
    if(
SpwRnd[playerid] == true)
    {
        new 
Random random(sizeof(SpwRnd));
        
SetPlayerPos(playeridRandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
        
RealPosition[playerid][0] = RandomSpawns[Random][0];
        
RealPosition[playerid][1] = RandomSpawns[Random][1];
        
RealPosition[playerid][2] = RandomSpawns[Random][2];
        
SpwRnd[playerid] = false;
    }
    return 
1;

A coordenadas que ele vai ser teleportado quando SpwRnd for igual a true, nгo vai ser a mesma que vai ser amazenado no RealPosition depois que ele for teleportado.

Cуdigo corrigido:
PHP код:
public OnPlayerSpawn(playerid)
{
    if(
SpwRnd[playerid] == true)
    {
        new 
Random random(sizeof(SpwRnd));
        
RealPosition[playerid][0] = RandomSpawns[Random][0];
        
RealPosition[playerid][1] = RandomSpawns[Random][1];
        
RealPosition[playerid][2] = RandomSpawns[Random][2];
        
SetPlayerPos(playeridRealPosition[playerid][0], RealPosition[playerid][1], RealPosition[playerid][Random][2]);
        
SpwRnd[playerid] = false;
    }
    return 
1;

Reply


Messages In This Thread
ajudem com spawn random / salvamento - by DKDarkking - 29.08.2015, 19:35
Re: ajudem com spawn random / salvamento - by Nixtren - 29.08.2015, 22:29
Re: ajudem com spawn random / salvamento - by DKDarkking - 30.08.2015, 00:01
Re: ajudem com spawn random / salvamento - by Whoo - 30.08.2015, 00:05
Re: ajudem com spawn random / salvamento - by DKDarkking - 30.08.2015, 00:11
Re: ajudem com spawn random / salvamento - by [BOPE]Seu._.Madruga - 30.08.2015, 01:19
Re: ajudem com spawn random / salvamento - by MultiKill - 30.08.2015, 02:07
Re: ajudem com spawn random / salvamento - by DKDarkking - 30.08.2015, 02:43
Re: ajudem com spawn random / salvamento - by MultiKill - 30.08.2015, 03:00

Forum Jump:


Users browsing this thread: 3 Guest(s)