how make respawn objects
#1

hello i create this script and i want make objects respawn when player destroy it but when compile give error

C:\Users\DON\samp03e_svr_win32\pawno\include\strea mer.inc(382) : warning 235: public function lacks forward declaration (symbol "OnPlayerEditObject")
C:\Users\DON\samp03e_svr_win32\pawno\include\strea mer.inc(404) : warning 235: public function lacks forward declaration (symbol "OnPlayerSelectObject")
C:\Users\DON\samp03e_svr_win32\pawno\include\strea mer.inc(406) : error 017: undefined symbol "SELECT_OBJECT_PLAYER_OBJECT"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

script:

PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
#else
main()
{
}
#endif
public OnGameModeInit()
{
}
public 
OnGameModeExit()
{
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
}
public 
OnPlayerConnect(playerid)
{
    
//glass
CreateDynamicObject(3851,231.03000000,1837.91000000,200.27000000,-38.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,234.73000000,1839.47000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,238.67000000,1839.55000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,242.63000000,1839.53000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,242.64000000,1828.27000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,238.68000000,1828.25000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,234.74000000,1828.20000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,230.74000000,1828.13000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,226.77000000,1839.42000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,226.77000000,1828.15000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,222.85000000,1828.17000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,222.83000000,1839.38000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,218.86000000,1828.19000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,218.87000000,1839.45000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,214.92000000,1828.14000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,214.87000000,1839.44000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,210.94000000,1828.15000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,210.87000000,1839.43000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,206.96000000,1828.10000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,206.95000000,1839.39000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,203.04000000,1828.12000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,203.01000000,1839.32000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,199.05000000,1828.12000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,199.07000000,1839.41000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,195.14000000,1828.16000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,195.10000000,1839.43000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,191.21000000,1828.18000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,191.16000000,1839.46000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,242.70000000,1850.80000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,242.73000000,1862.07000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,242.66000000,1873.38000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,238.70000000,1873.28000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,238.73000000,1862.05000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,238.73000000,1850.77000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,234.79000000,1850.77000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,230.83000000,1850.71000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,226.86000000,1850.67000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,222.94000000,1850.67000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,218.94000000,1850.59000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,214.95000000,1850.64000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,234.76000000,1862.03000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,230.83000000,1862.03000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,226.85000000,1861.98000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,222.87000000,1861.94000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,218.93000000,1861.85000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,214.94000000,1861.88000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,234.78000000,1873.31000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,230.88000000,1873.30000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,226.92000000,1873.23000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,222.90000000,1873.24000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,218.96000000,1873.15000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,214.95000000,1873.17000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,210.98000000,1850.74000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,206.96000000,1850.74000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,202.94000000,1850.65000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,198.98000000,1850.70000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,195.02000000,1850.73000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,191.06000000,1850.78000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,210.98000000,1861.99000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,202.96000000,1861.90000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,198.96000000,1861.97000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,195.00000000,1862.01000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,191.06000000,1862.04000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,210.98000000,1873.25000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,203.06000000,1873.22000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,199.06000000,1873.24000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,195.06000000,1873.25000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,191.03000000,1873.31000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,230.76000000,1839.43000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,207.08000000,1863.11000000,200.27000000,-38.00000000,90.00000000,179.42000000); //
CreateDynamicObject(3851,206.96000000,1861.94000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,207.12000000,1873.21000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,207.04000000,1873.17000000,196.84000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,203.14000000,1873.21000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,199.15000000,1873.24000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,195.18000000,1873.23000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,191.17000000,1873.24000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,203.16000000,1861.92000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,199.14000000,1861.89000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,195.12000000,1861.88000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,191.12000000,1861.89000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,191.15000000,1850.59000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,195.10000000,1850.56000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,199.15000000,1850.51000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,203.14000000,1850.53000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,191.13000000,1839.24000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,195.12000000,1839.22000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,199.15000000,1839.21000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,203.16000000,1839.21000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,191.10000000,1827.97000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,195.08000000,1827.98000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,199.06000000,1827.96000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,203.07000000,1827.94000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,207.05000000,1827.89000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,211.06000000,1827.90000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,207.08000000,1839.19000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,207.07000000,1850.47000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,211.09000000,1873.19000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,215.05000000,1873.21000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,218.95000000,1873.19000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,222.89000000,1873.20000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,226.90000000,1873.20000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,230.92000000,1873.22000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,234.90000000,1873.24000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,238.88000000,1873.26000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,242.86000000,1873.26000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,211.14000000,1839.21000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,215.04000000,1827.91000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,218.99000000,1827.88000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,222.95000000,1827.87000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,226.93000000,1827.90000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,230.91000000,1827.91000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,234.91000000,1827.90000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,238.91000000,1827.93000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,242.93000000,1827.93000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,211.08000000,1861.83000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,211.07000000,1850.48000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,215.17000000,1839.20000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,215.11000000,1850.50000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,215.11000000,1861.88000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,219.13000000,1861.86000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,223.11000000,1861.87000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,227.11000000,1861.87000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,231.15000000,1861.90000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,235.15000000,1861.92000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,238.91000000,1861.96000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,242.85000000,1861.97000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,219.10000000,1839.20000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,219.10000000,1850.54000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,223.08000000,1850.53000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,227.06000000,1850.57000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,231.04000000,1850.64000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,235.04000000,1850.58000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,239.08000000,1850.57000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,242.97000000,1850.60000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,223.13000000,1839.18000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,227.06000000,1839.14000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,234.97000000,1839.22000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,238.97000000,1839.22000000,203.75000000,0.00000000,90.00000000,0.00000000); //
CreateDynamicObject(3851,242.99000000,1839.26000000,203.75000000,0.00000000,90.00000000,0.00000000); //
    
return 1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    return 
1;
}
public 
OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    return 
1;
}
public 
OnPlayerText(playeridtext[])
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/mycommand"cmdtexttrue10) == 0)
    {
        
// Do something here
        
return 1;
    }
    return 
0;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    return 
1;
}
public 
OnPlayerExitVehicle(playeridvehicleid)
{
    return 
1;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    return 
1;
}
public 
OnPlayerEnterCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerLeaveCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerEnterRaceCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 
1;
}
public 
OnRconCommand(cmd[])
{
    return 
1;
}
public 
OnPlayerRequestSpawn(playerid)
{
    return 
1;
}
public 
OnObjectMoved(objectid)
{
    return 
1;
}
public 
OnPlayerObjectMoved(playeridobjectid)
{
    return 
1;
}
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    return 
1;
}
public 
OnVehicleMod(playeridvehicleidcomponentid)
{
    return 
1;
}
public 
OnVehiclePaintjob(playeridvehicleidpaintjobid)
{
    return 
1;
}
public 
OnVehicleRespray(playeridvehicleidcolor1color2)
{
    return 
1;
}
public 
OnPlayerSelectedMenuRow(playeridrow)
{
    return 
1;
}
public 
OnPlayerExitedMenu(playerid)
{
    return 
1;
}
public 
OnPlayerInteriorChange(playeridnewinterioridoldinteriorid)
{
    return 
1;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    return 
1;
}
public 
OnRconLoginAttempt(ip[], password[], success)
{
    return 
1;
}
public 
OnPlayerUpdate(playerid)
{
    return 
1;
}
public 
OnPlayerStreamIn(playeridforplayerid)
{
    return 
1;
}
public 
OnPlayerStreamOut(playeridforplayerid)
{
    return 
1;
}
public 
OnVehicleStreamIn(vehicleidforplayerid)
{
    return 
1;
}
public 
OnVehicleStreamOut(vehicleidforplayerid)
{
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    return 
1;
}
public 
OnPlayerClickPlayer(playeridclickedplayeridsource)
{
    return 
1;

Reply
#2

Hello,
I believe that objects respawns itself when some time will elapse and/or you will stay a quite far from them for a while..
There is no such function line RespawnObject, cuz it doesnt make sense.. Object's havent "live" here,
you can not destroy them (objects such buildings), but glass should spawn itself when its destroyed.

PS.
Use [.pawn][./pawn] tags next time, okay? Don't paste "unformatted" code.. It's hard to read, uh.
Greetz,
LetsOWN
Reply
#3

sorry i correct
but ι have seen some servers that when the player destroy the glass it reappear after a while
how do this
Reply
#4

It automatically respawns (if not correct), so there is no need for any code to do it.

Same goes for the breakable fences and shit, they respawn automatically after a certain amount of time.
Reply
#5

with CreateObject pwn compile but not respawn
with CreateDynamicObject when pwn compile give this error
C:\Users\DON\samp03e_svr_win32\pawno\include\strea mer.inc(382) : warning 235: public function lacks forward declaration (symbol "OnPlayerEditObject")
C:\Users\DON\samp03e_svr_win32\pawno\include\strea mer.inc(404) : warning 235: public function lacks forward declaration (symbol "OnPlayerSelectObject")
C:\Users\DON\samp03e_svr_win32\pawno\include\strea mer.inc(406) : error 017: undefined symbol "SELECT_OBJECT_PLAYER_OBJECT"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.
Reply
#6

Do you have the latest 0.3e includes, nton? The first two errors are new functions released in 0.3e. The last error, I have no idea (it's probably in the 0.3e include as-well).
Reply
#7

i have samp server 0.3e how find latest includes ?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)