SA-MP Forums Archive
[Ajuda] Obj - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Obj (/showthread.php?tid=386621)



Obj - s4kuL - 21.10.2012

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;
}



Re: Obj - Sky™ - 21.10.2012

qual erro disso ai?


Re: Obj - s4kuL - 21.10.2012

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));


Re: Obj - Sky™ - 21.10.2012

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


Re: Obj - s4kuL - 21.10.2012

-.- '


Re: Obj - zSuYaNw - 21.10.2012

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;




Re: Obj - s4kuL - 21.10.2012

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


Re: Obj - s4kuL - 21.10.2012

up ..


Re: Obj - leandro123456 - 21.10.2012

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;
}