[Ajuda] Cуdigo tб dando erro
#1

Pus esse codigo
Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid,2.5 , 1085.4875,-633.2848,113.1970))
  	{
		MoveObject(obj1, 1085.2828, -633.1617, 116.5200, 10,0.0000, 90.0000, 1.1150);
    }
    else
    {
		MoveObject(obj1,1083.23, -633.22, 114.36, 10, 0.00, 0.00, 2.22);
    }
}
	if(IsPlayerInRangeOfPoint(playerid,42.5 , 1094.8035,-662.0622,113.6484))
	{
        PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
    }
    else
    {
        PlayerPlaySound(playerid, 1063, 0.0, 0.0, 0.0);
    }
}
Mas tб dando isso

Код:
C:\Users\Shiba\Desktop\SAMP Server\gamemodes\OPS.pwn(1727) : error 010: invalid function or declaration
C:\Users\Shiba\Desktop\SAMP Server\gamemodes\OPS.pwn(1731) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Qual й o erro? Algъem me pode dizer?
Reply
#2

pawn Код:
public OnPlayerUpdate(playerid)
{
    new obj1;
    if(IsPlayerInRangeOfPoint(playerid,2.5 , 1085.4875,-633.2848,113.1970))
    {
        MoveObject(obj1, 1085.2828, -633.1617, 116.5200, 10,0.0000, 90.0000, 1.1150);
    }
    else
    {
        MoveObject(obj1,1083.23, -633.22, 114.36, 10, 0.00, 0.00, 2.22);
    }

    if(IsPlayerInRangeOfPoint(playerid,42.5 , 1094.8035,-662.0622,113.6484))
    {
        PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
    }
    else
    {
        PlayerPlaySound(playerid, 1063, 0.0, 0.0, 0.0);
    }
}
obs:tinha uma chave a mais

Espero que tenha ajudado
Reply
#3

pawn Код:
public OnPlayerUpdate(playerid)
{
    new obj1;
    if(IsPlayerInRangeOfPoint(playerid,2.5 , 1085.4875,-633.2848,113.1970))
    {
        MoveObject(obj1, 1085.2828, -633.1617, 116.5200, 10,0.0000, 90.0000, 1.1150);
    }
    else if(IsPlayerInRangeOfPoint(playerid,42.5 , 1094.8035,-662.0622,113.6484))
    {
        PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
    }
    else
    {
        // Funзхes a serem executadas ao contrario do if/elseif.
    }
}
Reply
#4

Tб resolvido obrigado XD
Reply
#5

Tira essa variбvel do onplayerupdate nй.
Reply
#6

Nгo, foi apenas graзas ao Bruno Alves tinha mesmo um "}" hб mais
Reply
#7

Quote:
Originally Posted by Netinho_the_killer
Посмотреть сообщение
Nгo, foi apenas graзas ao Bruno Alves tinha mesmo um "}" hб mais
Nгo й necessбrio deixar isso no OnPlayerUpdate, isso sу faz seu mode ficar MUITO pesado...
Reply
#8

Entгo onde ponho?
Reply
#9

Quote:
Originally Posted by [BR]Michael
Посмотреть сообщение
Nгo й necessбrio deixar isso no OnPlayerUpdate, isso sу faz seu mode ficar MUITO pesado...
Na vdd nгo й isso, ele se nгo for usado da maneira correta da lags no servidor!
Reply
#10

Quote:
Originally Posted by Netinho_the_killer
Посмотреть сообщение
Entгo onde ponho?
No caso ele deve ser uma variбvel global, pois estб armazenando o objetoID.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)