problem with DestroyPlayerObject
#1

i create playerobject this my code

PHP код:
 new kardus//global variable
forward proseskemas // timer
public proseskemas(playerid)
{
    
kardus CreateObject(30130.0,0.00.0,   0.000000.000000.00000);
    
AttachObjectToPlayer(kardus,playerid,-0.007800.410760.30842,   0.000000.000000.00000);
    
TogglePlayerControllable(playeridtrue);
    
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_CARRY);
    
AttachObjectToPlayer(kardus,playerid,-0.007800.410760.30842,   0.000000.000000.00000);
    
PlayerInfo[playerid][pkemas] = 0;
    
PlayerInfo[playerid][pjadi] = 1;
    
SendClientMessage(playeridPURPLE"proses selesai simpan di tempat jadi \n gunakan /simpanjadi");
}
CMD:prosesmentah(playeridparams[])
{
    if (
PlayerInfo[playerid][pFaction] == 3)
    {
        if(
IsPlayerInRangeOfPoint(playerid8.02489.1372,-2547.9502,9979.3379 ) || IsPlayerInRangeOfPoint(playerid8.02483.7302,-2548.0552,9979.3379 ) || IsPlayerInRangeOfPoint(playerid8.02477.1328,-2546.0029,9979.3379 ))
        {
            if (
PlayerInfo[playerid][pmentah] == 1)
            {
            
TogglePlayerControllable(playerid0);
            
SetTimerEx("proseskemas"10000false"i"playerid); // called timmer
             
SetCameraBehindPlayer(playerid);
             }
             else 
SendClientMessage(playeridCOLOR_RED"Kamu tidak punya bahan mentah ambil dulu di penyimpanan");
        }
        else 
SendClientMessage(playeridCOLOR_RED"Kamu tidak di tempat pengolahan");
    }
    else 
SendClientMessage(playeridCOLOR_RED"Kamu bukan pekerja pabrik");
    return 
1;

then i DestroyPlayerObject with this command
PHP код:
CMD:simpanjadi(playeridparams[])
{
if (
PlayerInfo[playerid][pFaction] == 3)
    {
        if(
IsPlayerInRangeOfPoint(playerid8.0,2464.3308,-2537.2014,9979.3379))
        {
            if (
PlayerInfo[playerid][pjadi] == 1)
            {
                
                
DestroyPlayerObject(playerid,kardus); // this destroyplayerobject
                
jadi += 1;
                
PlayerInfo[playerid][pjadi] = ;
                
SetPlayerSpecialAction(playerid,0);
                new 
jaaad[128];
                
format(jaaadsizeof(jaaad), "bahan mentah tersedia %d/10000"jadi);
                
UpdateDynamic3DTextLabelText(jaditextwhijaujaaad);
                
SendClientMessage(playeridwhijau"bahan telah di simpan");
            }
            else
            
SendClientMessage(playeridCOLOR_RED"Kamu tidak punya bahan jadi untuk disimpan");
        }
        else
          
SendClientMessage(playeridCOLOR_RED"Kamu tidak di tempat bahan jadi");
    }
    else
    
SendClientMessage(playeridCOLOR_RED"Kamu bukan pegawai pabrik");
return 
1;

object cannot destroy how to destroyplayerobject ??
Reply


Messages In This Thread
problem with DestroyPlayerObject - by ratxrat - 17.02.2016, 13:32
Re: problem with DestroyPlayerObject - by ratxrat - 17.02.2016, 14:08
Re: problem with DestroyPlayerObject - by ratxrat - 17.02.2016, 22:31
Re: problem with DestroyPlayerObject - by Sew_Sumi - 17.02.2016, 22:44

Forum Jump:


Users browsing this thread: 1 Guest(s)