What's wrong with this ?
#8

That should work perfectly, do exactly the same, don't change a thing.
pawn Код:
new
    BoxObject[ MAX_PLAYERS ],
    BoxVariable[ MAX_PLAYERS ]
;

dcmd_vbox( playerid, params[] )
{
    #pragma unused params

    if( Vip[ playerid ] < 1 )
        return SendClientMessage( playerid, COLOR_CERVENA, "  [!] Only Vips can do that !" );

    if( BoxVariable[ playerid ] )
        return SendClientMessage( playerid, COLOR_CERVENA, " You can not spawn two boxes !" );
       
    new
        Float:x,
        Float:y,
        Float:z
    ;
   
    GetPlayerPos( playerid, x, y, z );
    BoxObject[ playerid ] = CreateObject( 1685, x, y+2.0, z, 0.0, 0.0, 0.0 );
   
    BoxVariable[playerid] = 1;
   
    return 1;
}

dcmd_vrbox( playerid, params[] )
{
    #pragma unused params
   
    if( Vip[ playerid ] < 1 )
        return SendClientMessage( playerid, COLOR_CERVENA, "  [!] Only Vips can do that !" );
       
    if( !BoxVariable[ playerid ] )
        return SendClientMessage( playerid, COLOR_CERVENA, "You must spawn a box first to remove it !" );
       
    DestroyObject(BoxObject[ playerid ]);

    BoxVariable[playerid] = 0;

    return 1;
}
Reply


Messages In This Thread
What's wrong with this ? - by ServerScripter - 21.02.2012, 16:16
Re: What's wrong with this ? - by Toreno - 21.02.2012, 17:02
Re: What's wrong with this ? - by ServerScripter - 21.02.2012, 17:10
Re: What's wrong with this ? - by vassilis - 21.02.2012, 17:17
Re: What's wrong with this ? - by Toreno - 21.02.2012, 17:22
Re: What's wrong with this ? - by ServerScripter - 21.02.2012, 17:34
Re: What's wrong with this ? - by Konstantinos - 21.02.2012, 17:39
Re: What's wrong with this ? - by Toreno - 21.02.2012, 17:45
Re: What's wrong with this ? - by ServerScripter - 21.02.2012, 17:46
Re: What's wrong with this ? - by Toreno - 21.02.2012, 17:48

Forum Jump:


Users browsing this thread: 1 Guest(s)