[Pomoc] EditObject

Započeo EdisB, Mart 16, 2014, 15:35:49 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:LSL RP
Detaljan opis problema:Pozdrav svima. Koristim gamemode koji ima furniture sistem, odnosno sistem s kojim mozete uredjivati vasu kucu(stavljati fotelje, kauce..). Za to sve postoji komanda /pimphouse. Kada kucam tu komandu, ja moram npr. stojati ledjima okrenut zidu, da bi se fotelja stvorila iza mene. Mene sada zanima, kako da ja napravim kada kucam /pimphouse da se stvori taj objekt i da ga mogu editovati, ono pomicati, rotirati i ostalo.
Znam da je to EditObject funkcija, ali ne znam kako da je ubacim. Evo vam kod ovog sistema.

Dio skripte:if(strcmp(cmd,"/pimphouse",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            GetPlayerName(playerid, playername, sizeof(playername));
new family = PlayerInfo[playerid][pHousekey];
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT)
            {
                SendClientMessage(playerid,COLOR_GREY,"You must be onfoot.");
                return 1;
            }
            if(PlayerInfo[playerid][pFurnLocked] == 1)
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "You have been black listed from using the Furniture List.");
            return 1;
            }
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_WHITE, "{33CCFF}USAGE:{FFFFFF} /pimphouse [object ID]  -  List on /objects");
            return 1;
        }
        new mammount;
        mammount = strval(tmp);
        new objectid;
        if(mammount == 1729 && PlayerInfo[playerid][pLevel] >= 3) { objectid = mammount; }
        else if(mammount == 1728 && PlayerInfo[playerid][pLevel] >= 3) { objectid = mammount; }
        else if(mammount == 1504 && PlayerInfo[playerid][pLevel] >= 6) { objectid = mammount; }
        else if(mammount == 1506 && PlayerInfo[playerid][pLevel] >= 6) { objectid = mammount; }
        else if(mammount == 1535 && PlayerInfo[playerid][pLevel] >= 6) { objectid = mammount; }
        else if(mammount == 1567 && PlayerInfo[playerid][pLevel] >= 6) { objectid = mammount; }
        else if(mammount == 14880 && PlayerInfo[playerid][pLevel] >= 5) { objectid = mammount; }
        else if(mammount == 14866 && PlayerInfo[playerid][pLevel] >= 5) { objectid = mammount; }
        else if(mammount == 14806 && PlayerInfo[playerid][pLevel] >= 7) { objectid = mammount; }
        else if(mammount == 14446 && PlayerInfo[playerid][pLevel] >= 6) { objectid = mammount; }
        else if(mammount == 14391 && PlayerInfo[playerid][pLevel] >= 9) { objectid = mammount; }
        else if(mammount == 2738 && PlayerInfo[playerid][pLevel] >= 5) { objectid = mammount; }
        else if(mammount == 2003 && PlayerInfo[playerid][pLevel] >= 5) { objectid = mammount; }
        else if(mammount == 2648 && PlayerInfo[playerid][pLevel] >= 4) { objectid = mammount; }
        else if(mammount == 2526 && PlayerInfo[playerid][pLevel] >= 6) { objectid = mammount; }
        else if(mammount == 2523 && PlayerInfo[playerid][pLevel] >= 6) { objectid = mammount; }
        else if(mammount == 2332 && PlayerInfo[playerid][pLevel] >= 8) { objectid = mammount; }
        else if(mammount == 2103 && PlayerInfo[playerid][pLevel] >= 4) { objectid = mammount; }
        else if(mammount == 1745 && PlayerInfo[playerid][pLevel] >= 5) { objectid = mammount; }
        else if(mammount == 1481 && PlayerInfo[playerid][pLevel] >= 4) { objectid = mammount; }
        else if(mammount == 1281 && PlayerInfo[playerid][pLevel] >= 3) { objectid = mammount; }
        else if(mammount == 1726 && PlayerInfo[playerid][pLevel] >= 4) { objectid = mammount; }
        else if(mammount == 1896 && PlayerInfo[playerid][pLevel] >= 10) { objectid = mammount; }
        else if(mammount == 1824 && PlayerInfo[playerid][pLevel] >= 9) { objectid = mammount; }
        else if(mammount == 2185 && PlayerInfo[playerid][pLevel] >= 7) { objectid = mammount; }
        else if(mammount == 1433 && PlayerInfo[playerid][pLevel] >= 5) { objectid = mammount; }
        else if(mammount == 1704 && PlayerInfo[playerid][pLevel] >= 8) { objectid = mammount; }
        else if(mammount == 1723 && PlayerInfo[playerid][pLevel] >= 6) { objectid = mammount; }
        else if(mammount == 1805 && PlayerInfo[playerid][pLevel] >= 4) { objectid = mammount; }
        else if(mammount == 1701 && PlayerInfo[playerid][pLevel] >= 7) { objectid = mammount; }
        else if(mammount == 1752 && PlayerInfo[playerid][pLevel] >= 4) { objectid = mammount; }
        else if(mammount == 1795 && PlayerInfo[playerid][pLevel] >= 5) { objectid = mammount; }
        else if(mammount == 1808 && PlayerInfo[playerid][pLevel] >= 6) { objectid = mammount; }
        else if(mammount == 2028 && PlayerInfo[playerid][pLevel] >= 4) { objectid = mammount; }
        else if(mammount == 2147 && PlayerInfo[playerid][pLevel] >= 7) { objectid = mammount; }
        else if(mammount == 2192 && PlayerInfo[playerid][pLevel] >= 6) { objectid = mammount; }
        else if(mammount == 2632 && PlayerInfo[playerid][pLevel] >= 8) { objectid = mammount; }
        else if(mammount == 2872 && PlayerInfo[playerid][pLevel] >= 9) { objectid = mammount; }
        else if(mammount == 2779 && PlayerInfo[playerid][pLevel] >= 9) { objectid = mammount; }
        else if(mammount == 2778 && PlayerInfo[playerid][pLevel] >= 9) { objectid = mammount; }
        else if(mammount == 14651 && PlayerInfo[playerid][pLevel] >= 8) { objectid = mammount; }
        else if(mammount == 1280 && PlayerInfo[playerid][pLevel] >= 4) { objectid = mammount; }
        else if(mammount == 1985 && PlayerInfo[playerid][pLevel] >= 9) { objectid = mammount; }
        else { SendClientMessage(playerid,COLOR_GREY,"Invalid Object ID Or not high enough level !"); return 1; }

if (IsAtHouseEE(playerid,family,1))
{
    if(PlayerInfo[playerid][pHousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pHousekey]][hOwner], true) == 0)
    {
        for(new i = 0; i < sizeof(FurnInfo); i++)
                  {
if(FurnInfo[i][fTaken] == 0)
{
    if(FurnInfo[i][fTakenID] != family)
    {
if(IsObjectLimit(playerid,i,family,GetPlayerInterior(playerid)))
{
                          new world = GetPlayerVirtualWorld(playerid);
                          new Float:X,Float:Y,Float:Z,Float:Angle;
                    GetPlayerPos(playerid, X, Y, Z);
                    GetPlayerFacingAngle(playerid,Angle);
if(objectid == 14880 || objectid == 14866 || objectid == 14806
|| objectid == 14446 || objectid == 14391 || objectid == 2738
|| objectid == 2648 || objectid == 2332 || objectid == 1481
|| objectid == 1896 || objectid == 1824 || objectid == 1805
|| objectid == 1281 || objectid == 14651 || objectid == 1280)
{
                            FurnObject[i] = CreateDynamicObject(objectid, X, Y, Z, 0, 0, Angle, GetPlayerVirtualWorld(playerid),-1,-1,200.0);
                        }
                        else if(objectid == 1985)
                        {
                            EditObject(playerid, 1985);
                        }
                        else
                        {
                            FurnObject[i] = CreateDynamicObject(objectid, X, Y, Z-1, 0, 0, Angle, GetPlayerVirtualWorld(playerid),-1,-1,200.0);
                        }
                        FurnInfo[i][fx] = X;
                    FurnInfo[i][fy] = Y;
                    FurnInfo[i][fz] = Z;
                    FurnInfo[i][fAngle] = Angle;
                    FurnInfo[i][fWorld] = world;
                    FurnInfo[i][fType] = objectid;
                    FurnInfo[i][fTaken] = 1;
                    FurnInfo[i][fTakenID] = PlayerInfo[playerid][pHousekey];
                    HouseInfo[family][hOTaken]++;
                    SendClientMessage(playerid, COLOR_LIGHTRED, "Furniture has been planted at your location, if you want to remove it type /removefurn or /removeallfurn.");
                    //OnPropUpdate();
                                return 1;
                                }
                                else
                                {
                                    SendClientMessage(playerid,COLOR_GREY,"You've reached your limit on objects.");
                                    return 1;
                                }
                            }
                      }
}
return 1;
                }
}
else
{
    SendClientMessage(playerid,COLOR_GREY,"Your not inside your house.");
    return 1;
}
return 1;
    }
    return 1;
    }

Neke slike/video za lakse dobivanje pomoci(neobavezno):