[Ajuda] Obj
#1

Alguйm poderia arrumar esse cуdigo pra mim?

Grato.

pawn Код:
COMMAND:trazerobjeto(playerid,params[])
{
    new Float:X,Float:Y,Float:Z;

    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,ROXO,"[>] {FF0000}Vocк nгo й um(a) administrador(a) RCON!");
    if(ObjetoP[playerid] == 0) return SendClientMessage(playerid,ROXO,"[>] {FF0000}Vocк nгo tem objeto criado!");

    GetObjectPos(ObjetoP[playerid],X,Y,Z);
    SetObjectPos(GetPlayerPos(playerid,X,Y,Z));
    return 1;
}

COMMAND:irobjeto(playerid,params[])
{
    new Float:X,Float:Y,Float:Z;

    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,ROXO,"[>] {FF0000}Vocк nгo й um(a) administrador(a) RCON!");
    if(ObjetoP[playerid] == 0) return SendClientMessage(playerid,ROXO,"[>] {FF0000}Vocк nгo tem objeto criado!");

    GetObjectPos(ObjetoP[playerid],X,Y,Z);
    SetPlayerPos(GetObjectPos(ObjetoP[playerid],X,Y,Z));
    return 1;
}
Reply
#2

qual erro disso ai?
Reply
#3

6 warnings

C:\Documents and Settings\Lucas.DESKTOP\Desktop\Trabalhos\filterscr ipts\Objetos.pwn(117) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Lucas.DESKTOP\Desktop\Trabalhos\filterscr ipts\Objetos.pwn(117) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Lucas.DESKTOP\Desktop\Trabalhos\filterscr ipts\Objetos.pwn(117) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Lucas.DESKTOP\Desktop\Trabalhos\filterscr ipts\Objetos.pwn(131) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Lucas.DESKTOP\Desktop\Trabalhos\filterscr ipts\Objetos.pwn(131) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Lucas.DESKTOP\Desktop\Trabalhos\filterscr ipts\Objetos.pwn(131) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Warnings.


GetObjectPos(ObjetoP[playerid],X,Y,Z);
SetPlayerPos(GetObjectPos(ObjetoP[playerid],X,Y,Z));

e

GetObjectPos(ObjetoP[playerid],X,Y,Z);
SetObjectPos(GetPlayerPos(playerid,X,Y,Z));
Reply
#4

cara nunca vi uma coisa dessa

SetPlayerPos(GetObjectPos(ObjetoP[playerid],X,Y,Z));
n seria
SetPlayerPos(playerid, X,Y,Z));
acho que o erro й isso
Reply
#5

-.- '
Reply
#6

PHP код:
COMMAND:trazerobjeto(playerid,params[])
{

    if(!
IsPlayerAdmin(playerid)) 
        return 
SendClientMessage(playerid,ROXO,"[>] {FF0000}Vocк nгo й um(a) administrador(a) RCON!");
        
    if(
ObjetoP[playerid] == 0
        return 
SendClientMessage(playerid,ROXO,"[>] {FF0000}Vocк nгo tem objeto criado!");

    static 
        
Float:X[2],
        
Float:Y[2],
        
Float:Z[2]
    ;
    
    
GetObjectPos(ObjetoP[playerid],X[0],Y[0],Z[0]);
    
    
GetPlayerPos(ObjetoP[playerid],X[1],Y[1],Z[1]);
    
    
SetObjectPos(ObjetoP[playerid], X[1],Y[1],Z[1]);
    return 
1;
}

COMMAND:irobjeto(playerid,params[])
{
   

    if(!
IsPlayerAdmin(playerid)) 
        return 
SendClientMessage(playerid,ROXO,"[>] {FF0000}Vocк nгo й um(a) administrador(a) RCON!");
        
    if(
ObjetoP[playerid] == 0
        return 
SendClientMessage(playerid,ROXO,"[>] {FF0000}Vocк nгo tem objeto criado!");
        

    static 
        
Float:X,
        
Float:Y,
        
Float:Z
    
;
    
    
GetObjectPos(ObjetoP[playerid],X,Y,Z);    
    
SetPlayerPos(playerid, ,X,Y,Z);
    return 
1;

Reply
#7

Garfield o trazer objeto nгo funcionou cara, o objeto vai pra outro local... alguma sugestгo?
Reply
#8

up ..
Reply
#9

pawn Код:
COMMAND:trazerobjeto(playerid,params[])
{
    new Float:X,Float:Y,Float:Z;

    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,ROXO,"[>] {FF0000}Vocк nгo й um(a) administrador(a) RCON!");
    if(ObjetoP[playerid] == 0) return SendClientMessage(playerid,ROXO,"[>] {FF0000}Vocк nгo tem objeto criado!");
        GetPlayerPos(playerid, X, Y, Z);
        SetObjectPos(ObjetoP[playerid], X, Y, Z);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)