Param's to destroy object
#1

pawn Код:
forward destruirobj2( { Float , _ } : ... );
public destruirobj2( { Float , _ } : ... ) {
    new c = numargs ( ) , idx;
    for ( new i = 0; i < c; i ++ ) {
        new Arg[ 32 ] ;
        while ( getarg ( i , idx ) ) {
            Arg[ idx ] = getarg ( i , idx );
            idx ++;
        }
        format ( Arg , 32 , "%d" , Arg );
        printf("%d",Arg);
        idx = 0;
        DestroyObject(strval(Arg));
    }
    return 1;
}
command

pawn Код:
if(!strcmp("/2mira",cmdtext,true))
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    new obj=CreateObject(19314,x,y+1,z,0,0,0,250);
    new obj2=CreateObject(19314,x,y-1,z,0,0,0,250);
    printf("%d,%d",obj,obj2);
    SetTimerEx("destruirobj2",3000,false,"dd",obj,obj2);
    return 1;
}
in console

Код:
[21:44:05] 264,265
[21:44:09] 49
[21:44:09] 49
when i write /2mira create the objects with id's 264 and 265 but after, don't read this numbers, why? timer problem?
Reply


Messages In This Thread
Param's to destroy object - by DartakousLien - 24.04.2013, 20:22
Re: Param's to destroy object - by Mattakil - 24.04.2013, 20:31
AW: Param's to destroy object - by BigETI - 24.04.2013, 20:39
Respuesta: Re: Param's to destroy object - by DartakousLien - 24.04.2013, 21:49

Forum Jump:


Users browsing this thread: 1 Guest(s)