PDA

View Full Version : Buildings


Palaa
16/01/2012, 07:27 AM
How to delete buildings in 0.3d??
Using RP Script' Can any one help?

nmader
16/01/2012, 07:44 AM
Well, that is really quite simple, what I recommend, is that you use the search bar on forum.sa-mp.com, and just search SAMP Editor and get the latest one, and it allows you to delete buildings, and it gives you a code which you should later add to your OnGameModeInit (OnFilterScriptInit if you are using it as a filterscript)

Feel free to give me some Rep if I helped! :D

Palaa
16/01/2012, 07:50 AM
Cant Understand this editor : http://forum.sa-mp.com/showthread.php?t=282801&highlight=SAMP+Editor

Palaa
16/01/2012, 08:09 AM
Okay i got the code After Putting In OnGameModeInIt ,Still Error'

This is code :
RemoveBuildingForPlayer(playerid, 3999, 1785.9766, -1564.8594, 25.2500, 0.25);
RemoveBuildingForPlayer(playerid, 4079, 1785.9766, -1564.8594, 25.2500, 0.25);
CreateObject(3607, 1789.37, -1566.99, 18.53, 0.00, 0.00, 35.46);

Errors : C:\Documents and Settings\Administrator\My Documents\Downloads\bUILING.pwn(35) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Documents and Settings\Administrator\My Documents\Downloads\bUILING.pwn(36) : error 017: undefined symbol "RemoveBuildingForPlayer"
C:\Documents and Settings\Administrator\My Documents\Downloads\bUILING.pwn(38) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

SupremeCommander
16/01/2012, 08:34 AM
You're getting those errors coz you're using 0.3c includes..... Update your client AND your includes to 0.3d

Palaa
16/01/2012, 08:43 AM
Now this error
C:\Documents and Settings\Administrator\My Documents\Downloads\bUILING.pwn(35) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Administrator\My Documents\Downloads\bUILING.pwn(36) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Administrator\My Documents\Downloads\bUILING.pwn(38) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

ғαιιοцт
16/01/2012, 09:00 AM
The error messages are displayed in english; not computer language.

If it says "undefined symbol: 'playerid'
Then what could possibly be wrong?!

TheLazySloth
16/01/2012, 09:08 AM
Put the code in OnPlayerConnect NOT OnGameModeInIt

Palaa
16/01/2012, 09:33 AM
Put the code in OnPlayerConnect NOT OnGameModeInIt



Here your answer after putting in OnplayerConnect

C:\Documents and Settings\Administrator\My Documents\Downloads\bUILING.pwn(35) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Administrator\My Documents\Downloads\bUILING.pwn(36) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Administrator\My Documents\Downloads\bUILING.pwn(38) : warning 217: loose indentation
C:\Documents and Settings\Administrator\My Documents\Downloads\bUILING.pwn(61) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

TheLazySloth
16/01/2012, 09:36 AM
That shouldn't be... the OnPlayerConnect function has playerid
Are you sure you did it correctly?

Palaa
16/01/2012, 09:50 AM
public OnPlayerConnect(playerid)
{

RemoveBuildingForPlayer(playerid, 3999, 1785.9766, -1564.8594, 25.2500, 0.25);
RemoveBuildingForPlayer(playerid, 4079, 1785.9766, -1564.8594, 25.2500, 0.25);
CreateObject(3607, 1789.37, -1566.99, 18.53, 0.00, 0.00, 35.46);

return 1;
}

ғαιιοцт
16/01/2012, 09:54 AM
You need to use tabs after each {


public OnPlayerConnect(playerid)
{
RemoveBuildingForPlayer(playerid, 3999, 1785.9766, -1564.8594, 25.2500, 0.25);
RemoveBuildingForPlayer(playerid, 4079, 1785.9766, -1564.8594, 25.2500, 0.25);
CreateObject(3607, 1789.37, -1566.99, 18.53, 0.00, 0.00, 35.46);

return 1;
}

Palaa
16/01/2012, 10:10 AM
Not Removed , Building Still there.

ғαιιοцт
16/01/2012, 11:45 AM
then increase the range (currently 0.25)
Or make sure the coordinates are perfect.


The range parameter means that objects Withing a certain range of those coordinates will be removed if they have the same objectid.

Palaa
17/01/2012, 06:56 AM
Any one???

thimo
17/01/2012, 09:34 AM
Put it under onplayerconnect u didnt put it there thats bullshit
RemoveBuildingForPlayer(playerid, 3999, 1785.9766, -1564.8594, 25.2500, 0.25);
RemoveBuildingForPlayer(playerid, 4079, 1785.9766, -1564.8594, 25.2500, 0.25);
Put it under onplayerconnect u didnt put it there thats bullshit :d