Üzenetek megjelenítése

Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.


Témák - Dynamo1997

Oldalak: [1]
1
Leírások/Útmutatók/Segítség / 1.0.7.0 patch hiba!!!!!Help
« Dátum: 2012. november 04. - 11:32:03 »
Sziasztok!
Elinditom az UpadteTitle-t akkor 1 mp re baugrik 1 ablak,mikor a TitleUpadtet akkor ezt kapom:
Installation failes.Run setup to install upadte.

2
Leírások/Útmutatók/Segítség / Mentések helye
« Dátum: 2012. november 04. - 10:56:32 »
Sziasztok!
Nem tudom hova ment most a GTA IV ,Dokumentumokhoz nem,Appdatába se :O
Akkor hova is?

3
Szkript kérések / Kocsi lehivo script
« Dátum: 2012. október 20. - 15:46:20 »
Sziasztok
Egy kicsi lehivo script kell!

4
Segítségkérés / AMX csinálás hiba
« Dátum: 2012. október 20. - 15:18:37 »
Sziasztok
Nem enged AMX et csinálni!
Ezt a hibát kapom:
C:\\COD\\gamemodes\\asd.pwn(1) : error 010: invalid function or declaration
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
1 Error.

5
Segítségkérés / AMX csinálás hiba
« Dátum: 2012. október 19. - 19:21:39 »
Sziasztok
Nem tudom mért nem menged amx et csinálni :S
Ezt a hibát kapom:
fatal error 100: cannot read from file: \"fixchars\"
Compilation aborted.Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
1 Error.

6
Segítségkérés / Tuning hiba :SSS
« Dátum: 2012. október 19. - 15:50:50 »
Ba írom hogy Tuning kijôn minden szép de mikor kiválasztom akkor eltunik és nem tôrténik semmi :S
Ezt használom : http://sampforum.hu/index.php?topic=14328.0

7
Segítségkérés / Maapok berakása
« Dátum: 2012. október 15. - 15:34:17 »
Sziasztok!
Hogy tudok a szerverbe mapokat berakni,mint ez: http://sampforum.hu/index.php?topic=30450.0 ??

8
Segítségkérés / Object Editor inditása
« Dátum: 2012. október 14. - 16:09:54 »
Sziasztok!
Nem tudom hogy kel elinidtani az object editorom!
 
/*
 
             _____           _     _       
            |  __ \\         | |   (_)     
            | |  | |_ __ ___| |__  _ _ __ 
            | |  | | \'__/ _ \\ \'_ \\| | \'_ \\
            | |__| | | |  __/ |_) | | | | |
            |_____/|_|  \\___|_.__/|_|_| |_|
                  ObjectEditor v1.0.0
                    ˆDrebin 2012
 
*/
#define FILTERSCRIPT
#include <a_samp>
#include <dini>
#include <zcmd>
#include <sscanf2>
//==============================================================================
//                            > D E F I N E S <
//
//                 true = enabled/yes | false = disabled/no
//==============================================================================
#define RCON_ADMINS_ONLY               false      //Restrict the usage of the editor to RCON admins
#define TOGGLED_ONLY                  false      //If true, an admin has to /toggleeditor the player first before they can use the editor.
#define USE_COMMAND_SHORTCUTS            true      //Allow the usage of command shortcuts (eg. /createnewobject -> /cno)
#define USE_MAX_CREATE_DISTANCE          true      //Restrict the distance an object is create from the player
#define USE_MAX_MOVE_DISTANCE            true      //Restict the max. distance a player can move the object
#define MAX_CREATE_DISTANCE               200.0      //The max. distance a player can enter when he creates an object (only if USEMAX_CREATE_DISTANCE is enabled)
#define MAX_MOVE_DISTANCE                400.0      //The max. distance a player can move an object (only if MAX_CREATE_DISTANCE is enabled)
#define ALLOW_EXPORT_MAP_FILE            false      //Allow normal players to export an object file? (if disabled, only RCON admins can)
#define ALLOW_EDIT_OBJECT_ON_DUPLICATE       true      //Allow a player to enable the auto edition of an object after it has been duplicated
#define ALLOW_USE_MATERIAL_CHANGE_DIALOG   true      //Allow the player to use the material change dialog (recommended)
#define ALLOW_EDIT_OBJECT_ON_CREATE       true      //Allow a player to enable the auto edition of an object after creating it
#define ALLOW_KEEP_MATERIAL               false      //Allow a player to enable a function which keeps the cusrom texture after changing the model of the object
#define ALLOW_USE_CROSS                  true      //Allow a player to enable the fade cross when he\'s in the flyeditor
#define ALLOW_TRANSFER_MATERIAL            true      //If a player duplicates an object with a custom material(texture) on it, this allows him to
                                    //-> enable a setting which automatically transfers the material to the duplicated object
//==============================================================================
//                           > D I A L O G   I D S <
//==============================================================================
#define DIALOG_MAINMENU 1693
#define DIALOG_MAP_SAVENAME 1694
#define DIALOG_MAP_EXPORTNAME 1695
#define DIALOG_MAP_LOAD 1696
#define DIALOG_SELECTMENU 1697
#define DIALOG_CHANGEMODEL 1698
#define DIALOG_MATERIALS 1699
#define DIALOG_MATERIALINDEX 1700
#define DIALOG_MODELID 1701
#define DIALOG_TXDNAME 1702
#define DIALOG_TEXTURENAME 1703
#define DIALOG_COLOR 1704
#define DIALOG_SETTINGS 1705
#define DIALOG_EDITORCOMMANDS 1706
#define DIALOG_EDITORCOMMANDS2 1707
#define DIALOG_SETTINGSHELP 1708
//==============================================================================
//                        > C O L O R  D E F I N E S <
//==============================================================================
#define COLOR_USAGE    0x91FF91FF      //{91FF91} - The color of the command usage
#define COLOR_USAGE2    0x87FF87FF      //{87FF87} - The color of the command parameter explanation
#define COLOR_WARNING    0xF58282FF       //{F58282} - The color of the red error messages
#define COLOR_INFO       0xF5F582FF      //{F5F582} - The color of the info messages
                        //{A9C4E4} - default dialog color
//==============================================================================
//==============================================================================
//------------------------------------------------------------------------------
// !!!  D O  N O T  C H A N G E  V A L U E S  B E L O W  T H I S  L I N E  !!!
//------------------------------------------------------------------------------
//==============================================================================
#define INVALID_OBJECT_NUMBER (-1)
#define MAX_CREATED_OBJECTS 400
#define MOVE_FORWARD          1
#define MOVE_BACK             2
#define MOVE_LEFT             3
#define MOVE_RIGHT            4
#define MOVE_FORWARD_LEFT       5
#define MOVE_FORWARD_RIGHT      6
#define MOVE_BACK_LEFT          7
#define MOVE_BACK_RIGHT         8
#define MOVE_SPEED              100.0
#define ACCEL_RATE              0.03
enum objectenum
{
created,
objectID,
modelID,
Float:XLoc,
Float:YLoc,
Float:ZLoc,
Float:XRot,
Float:YRot,
Float:ZRot,
usesmaterial,
indexused,
modelused,
txdused,
textureused,
colorused,
matindex,
matmodel
};
enum playerenum
{
bool:EditObjectOnCreate,
bool:EditObjectOnDuplicate,
bool:UseMaterialDialog,
bool:TransferMaterial,
bool:KeepMaterial,
bool:UseCross,
bool:editing,
totalobjects,
editobject,
flyeditor,
flyobject,
mode,
lrold,
udold,
lastmove,
Float:accelmul,
Float:poX,
Float:poY,
Float:poZ,
canuse
};
new pInfo[MAX_PLAYERS][playerenum];
new oInfo[MAX_PLAYERS][MAX_CREATED_OBJECTS][objectenum];
new PlayerText:Cross[2];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print(\"-----------------------------------------------------------------------------\\n\");
print(\"                         > Drebin\'s Object Editor <                          \");
print(\"                                   v1.0.0                                    \");
print(\"                                                                             \");
print(\"                                ˆDrebin 2012                                 \");
print(\"                                                                             \");
print(\"-----------------------------------------------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
   Endflyeditor(i);
}
return 1;
}
#endif
public OnPlayerConnect(playerid)
{
ResetAllValues(playerid);
pInfo[playerid][canuse]               = false;
pInfo[playerid][EditObjectOnCreate]    = false;
pInfo[playerid][EditObjectOnDuplicate]    = false;
pInfo[playerid][useMaterialDialog]       = true;
pInfo[playerid][TransferMaterial]       = true;
pInfo[playerid][KeepMaterial]         = true;
pInfo[playerid][useCross]            = false;
pInfo[playerid][lrold]                   = 0;
pInfo[playerid][udold]               = 0;
pInfo[playerid][mode]               = 0;
pInfo[playerid][lastmove]            = 0;
pInfo[playerid][accelmul]            = 0.0;
Cross[0] = CreatePlayerTextDraw(playerid, 320.000000, 221.000000, \"_\");
PlayerTextDrawAlignment(playerid, Cross[0], 2);
PlayerTextDrawBackgroundColor(playerid, Cross[0], 255);
PlayerTextDrawFont(playerid, Cross[0], 1);
PlayerTextDrawLetterSize(playerid, Cross[0], 0.500000, 1.400000);
PlayerTextDrawColor(playerid, Cross[0], -1);
PlayerTextDrawSetOutline(playerid, Cross[0], 0);
PlayerTextDrawSetProportional(playerid, Cross[0], 1);
PlayerTextDrawSetShadow(playerid, Cross[0], 1);
PlayerTextDrawUseBox(playerid, Cross[0], 1);
PlayerTextDrawBoxColor(playerid, Cross[0], -1);
PlayerTextDrawTextSize(playerid, Cross[0], 0.000000, -3.000000);
Cross[1] = CreatePlayerTextDraw(playerid, 320.000000, 229.000000, \"_\");
PlayerTextDrawAlignment(playerid, Cross[1], 2);
PlayerTextDrawBackgroundColor(playerid, Cross[1], 255);
PlayerTextDrawFont(playerid, Cross[1], 1);
PlayerTextDrawLetterSize(playerid, Cross[1], 0.500000, -0.400000);
PlayerTextDrawColor(playerid, Cross[1], -1);
PlayerTextDrawSetOutline(playerid, Cross[1], 0);
PlayerTextDrawSetProportional(playerid, Cross[1], 1);
PlayerTextDrawSetShadow(playerid, Cross[1], 1);
PlayerTextDrawUseBox(playerid, Cross[1], 1);
PlayerTextDrawBoxColor(playerid, Cross[1], -1);
PlayerTextDrawTextSize(playerid, Cross[1], 0.000000, 13.000000);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
Endflyeditor(playerid);
ResetAllValues(playerid);
pInfo[playerid][canuse]   = false;
return 1;
}
CMD:openeditor(playerid, params[])
{
#if RCON_ADMINS_ONLY == true
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_WARNING,\"Sorry, the object editor is for RCON admins only.\");
#endif
#if TOGGLED_ONLY == true
if(pInfo[playerid][canuse] != 1) return SendClientMessage(playerid, COLOR_WARNING, \"Sorry, you have to ask an admin first before you can use the object editor.\");
#endif
if(pInfo[playerid][editing] == false)
{
SendClientMessage(playerid, -1, \"[Editor {91FF91}ON{FFFFFF}]\");
SendClientInfoMessage(playerid, \"You have entered the object editor.\");
pInfo[playerid][editing] = true;
}
else
{
SendClientMessage(playerid, -1, \"[Editor {F58282}OFF{FFFFFF}]\");
DeleteAllObjects(playerid);
ResetAllValues(playerid);
SendClientInfoMessage(playerid, \"You have left the editor. | All your objects have been automatically deleted.\");
pInfo[playerid][editing] = false;
}
return 1;
}
CMD:cno(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_createnewobject(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:createnewobject(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new model, Float:distance;
     if(sscanf(params, \"iF(10.0)\", model, distance))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /createnewobject [modelid] <distance>\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Creates a new object using the defined model ID and distance.\");
SendClientMessage(playerid, COLOR_USAGE2, \"> If no distance is entered, the default value of 10.0m is used.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /cno.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
   #if USE_MAX_CREATE_DISTANCE == true
   if(distance > MAX_CREATE_DISTANCE) return SendClientErrorMessage(playerid, 5);
   #endif
    for(new i = 0; i < MAX_CREATED_OBJECTS; i++)
    {
        if(oInfo[playerid][created] == 0)
        {
            oInfo[playerid][created] = 1;
         if(pInfo[playerid][flyeditor] == 1)
         {
                  new
                     Float:fPX, Float:fPY, Float:fPZ,
                     Float:fVX, Float:fVY, Float:fVZ;
                  GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
                  GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
                  oInfo[playerid][modelID]  = model;
                  oInfo[playerid][XLoc] = fPX + floatmul(fVX, distance);
                  oInfo[playerid][YLoc] = fPY + floatmul(fVY, distance);
                  oInfo[playerid][ZLoc] = fPZ + floatmul(fVZ, distance);
                  oInfo[playerid][XRot]     = 0.0;
                  oInfo[playerid][YRot]     = 0.0;
                  oInfo[playerid][ZRot]     = 0.0;
                  oInfo[playerid][objectID] = CreateObject(model,oInfo[playerid][XLoc], oInfo[playerid][YLoc], oInfo[playerid][ZLoc],0,0,0);
                  pInfo[playerid][totalobjects]       ++;
                  new string[100];
                  format(string, sizeof(string), \"Created object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}) %.1f meter infront of you.\", i, oInfo[playerid][modelID], distance);
                  SendClientMessage(playerid, COLOR_INFO, string);
         }
         else
         {
            new Float:X, Float:Y, Float:Z;
            new Float:rot;
            GetPlayerPos(playerid, X, Y, Z);
            if(IsPlayerInAnyVehicle(playerid))
               GetVehicleZAngle(GetPlayerVehicleID(playerid), rot);
            else
               GetPlayerFacingAngle(playerid, rot);
            oInfo[playerid][modelID]  = model;
            oInfo[playerid][XLoc]     = X + (distance * floatsin(-rot, degrees));
            oInfo[playerid][YLoc]     = Y + (distance * floatcos(-rot, degrees));
            oInfo[playerid][ZLoc]     = Z;
            oInfo[playerid][XRot]     = 0.0;
            oInfo[playerid][YRot]     = 0.0;
            oInfo[playerid][ZRot]     = 0.0;
            oInfo[playerid][objectID] = CreateObject(model,X + (distance * floatsin(-rot, degrees)), Y + (distance * floatcos(-rot, degrees)), Z,0,0,0);
            pInfo[playerid][totalobjects]       ++;
            new string[100];
            format(string, sizeof(string), \"Created object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}) %.1f meter infront of you.\", i, oInfo[playerid][modelID], distance);
            SendClientMessage(playerid, COLOR_INFO, string);
         }
         #if ALLOW_EDIT_OBJECT_ON_CREATE == true
         if(pInfo[playerid][EditObjectOnCreate] == true)
         {
            pInfo[playerid][editobject] = i;
            EditObject(playerid, oInfo[playerid][objectID]);
         }
         #endif
                break;
      }
   }
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:deo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_deleteobject(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:deleteobject(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
    new object;
     if(sscanf(params, \"i\", object))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /deleteobject [object number]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Deleted the defined object number.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /deo.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] !=0)
{
    if(oInfo[playerid][object][created] == 1)
    {
        DestroyObject(oInfo[playerid][object][objectID]);
        pInfo[playerid][totalobjects]--;
        new string[100];
        format(string, sizeof(string), \"You have succesfully deleted object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}).\", object, oInfo[playerid][object][modelID]);
        SendClientMessage(playerid, COLOR_INFO, string);
        oInfo[playerid][object][created]       = 0;
        oInfo[playerid][object][objectID]      = INVALID_OBJECT_ID;
            oInfo[playerid][object][modelID]       = 0;
            oInfo[playerid][object][XLoc]          = 0.0;
            oInfo[playerid][object][YLoc]          = 0.0;
            oInfo[playerid][object][ZLoc]          = 0.0;
            oInfo[playerid][object][XRot]          = 0.0;
            oInfo[playerid][object][YRot]          = 0.0;
            oInfo[playerid][object][ZRot]          = 0.0;
      oInfo[playerid][object][indexused]       = 0;
      oInfo[playerid][object][modelused]       = 0;
      oInfo[playerid][object][txdused]       = 0;
      oInfo[playerid][object][textureused]    = 0;
      oInfo[playerid][object][colorused]       = 0;
      oInfo[playerid][object][matindex]       = -1;
      oInfo[playerid][object][matmodel]       = -1;
      new str1[15], str2[15], str3[15];
      format(str1, sizeof(str1), \"%i_txdname\", object);
      format(str2, sizeof(str2), \"%i_texturename\", object);
      format(str3, sizeof(str3), \"%i_color\", object);
      DeletePVar(playerid, str1);
      DeletePVar(playerid, str2);
      DeletePVar(playerid, str3);
      oInfo[playerid][object][usesmaterial] = 0;
    }
    else
    {
        SendClientErrorMessage(playerid, 0);
   }
}
else
{
    SendClientErrorMessage(playerid, 1);
}
}
return 1;
}
CMD:deao(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_deleteallobjects(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:deleteallobjects(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
if(pInfo[playerid][totalobjects] !=0)
{
    DeleteAllObjects(playerid);
    SendClientInfoMessage(playerid, \"You have successfully deleted all objects.\");
}
else SendClientErrorMessage(playerid, 1);
return 1;
}
CMD:neo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_nearestobject(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:nearestobject(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
if(pInfo[playerid][totalobjects] != 0)
{
if(pInfo[playerid][flyeditor] == 1) return SendClientErrorMessage(playerid, 9);
   new Float: px, Float: py, Float: pz;
   new Float: oX, Float: oY, Float: oZ;
   GetPlayerPos(playerid, px, py, pz);
   new Float:currentdistance, Float:distance = 99999999.9;
   new object;
   for(new i = 0; i < MAX_CREATED_OBJECTS; i++)
   {
       GetObjectPos(oInfo[playerid][objectID], oX, oY, oZ);
       currentdistance = GetPlayerDistanceFromPoint(playerid, oX, oY, oZ);
       if(currentdistance < distance)
       {
           object = i;
           distance = currentdistance;
       }
   }
new string[128];
format(string,sizeof(string),\"The closest object to you is object number {F58282}%i{F5F582} (Distance: %.1fm).\", object, distance);
    SendClientInfoMessage(playerid, string);
}
else
{
    SendClientErrorMessage(playerid, 1);
}
return 1;
}
CMD:goo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_gotoobject(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:gotoobject(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
if(pInfo[playerid][flyeditor] == 1) return SendClientErrorMessage(playerid, 9);   
    new object;
     if(sscanf(params, \"i\", object))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /gotoobject [object number]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Teleports you to the defined object number.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /goo.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] != 0)
    {
        if(oInfo[playerid][object][created] == 1)
        {
      new Float:X, Float:Y, Float:Z;
      new string[100];
            GetObjectPos(oInfo[playerid][object][objectID], X, Y, Z);
            SetPlayerPos(playerid, X + 1.0, Y + 1.0, Z + 5.0);
            format(string, sizeof(string), \"You have teleported yourself to object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}).\", object, oInfo[playerid][object][modelID]);
            SendClientInfoMessage(playerid, string);
        }
        else
        {
            SendClientErrorMessage(playerid, 0);
        }
    }
    else
    {
   SendClientErrorMessage(playerid, 1);
    }
}
return 1;
}
CMD:rpom(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_replaceobjectmodel(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:replaceobjectmodel(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
    new object, model, oldmodel;
     if(sscanf(params, \"ii\", object, model))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /replaceobjectmodel [object number] [new model]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Replaces the model of the defined object number with the new model.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /rpom.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] != 0)
    {
        if(oInfo[playerid][object][created] == 1)
        {
            oldmodel = oInfo[playerid][object][modelID];
      DestroyObject(oInfo[playerid][object][objectID]);
      oInfo[playerid][object][objectID] = CreateObject(model, oInfo[playerid][object][XLoc],oInfo[playerid][object][YLoc],oInfo[playerid][object][ZLoc],oInfo[playerid][object][XRot],oInfo[playerid][object][YRot],oInfo[playerid][object][ZRot]);
                oInfo[playerid][object][modelID] = model;
      if(oInfo[playerid][object][usesmaterial] == 1){
         if(pInfo[playerid][KeepMaterial] == true){
               ChangeObjectMaterial(playerid, object);
         }
         else
            ResetObjectMaterial(playerid, object);
      }
                new string[135];
                format(string, sizeof(string), \"You succesfully replaced the model of object {F58282}%i{F5F582} (Model: {F58282}%i{F5F582}) with model {F58282}%i{F5F582}.\", object, oldmodel, model);
                SendClientInfoMessage(playerid, string);
   }
        else
        {
            SendClientErrorMessage(playerid, 0);
        }
    }
    else
    {
   SendClientErrorMessage(playerid, 1);
    }
}
return 1;
}
CMD:saveobjects(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
{
new dg1[60];
format(dg1, sizeof(dg1), \"Enter the name of the file you want to save the objects in:\");
ShowPlayerDialog(playerid, DIALOG_MAP_SAVENAME, DIALOG_STYLE_INPUT,\"Save objects\",dg1,\"Save\",\"Cancel\");
}
return 1;
}
CMD:exportobjects(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
#if ALLOW_EXPORT_MAP_FILE == false
if(IsPlayerAdmin(playerid))
{
   new dg1[65];
   format(dg1, sizeof(dg1), \"Enter the name of the file you want to export the objects to:\");
   ShowPlayerDialog(playerid, DIALOG_MAP_EXPORTNAME, DIALOG_STYLE_INPUT,\"Export name\",dg1,\"Export\",\"Cancel\");
}
else return SendClientErrorMessage(playerid, 3);
#else
new dg1[65];
format(dg1, sizeof(dg1), \"Enter the name of the file you want to export the objects to:\");
ShowPlayerDialog(playerid, DIALOG_MAP_EXPORTNAME, DIALOG_STYLE_INPUT,\"Export name\",dg1,\"Export\",\"Cancel\");
#endif
return 1;
}
CMD:loadobjects(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
ShowPlayerDialog(playerid, DIALOG_MAP_LOAD, DIALOG_STYLE_INPUT, \"Load map\",\"Enter the name of the file you want to load:\",\"Load\",\"Cancel\");
return 1;
}
CMD:edo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_editobject(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:editobject(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
    new object;
     if(sscanf(params, \"i\", object))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /editobject [object number]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to modify the position and rotation of the defined object number with your mouse.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /edo.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] !=0)
{
    if(oInfo[playerid][object][created] == 1)
    {
        EditObject(playerid, oInfo[playerid][object][objectID]);
      pInfo[playerid][editobject] = object;
    }
    else
    {
        SendClientErrorMessage(playerid, 0);
   }
}
else
{
    SendClientErrorMessage(playerid, 1);
}
}
return 1;
}
CMD:seo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_selectobject(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:selectobject(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
if(pInfo[playerid][totalobjects] !=0)
{
    SelectObject(playerid);
SendClientInfoMessage(playerid, \"You can now select an object by clicking onto it with your cursor.\");
}
else SendClientErrorMessage(playerid, 1);
return 1;
}
CMD:soxo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setobjectxoffset(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setobjectxoffset(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new object, Float:offset;
     if(sscanf(params, \"if\", object, offset))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setobjectxoffset [object number] [value]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to move the chosen object number on the X axis.\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Positive values will move the object eastbound, negative values westbound.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /soxo.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
   #if USE_MAX_MOVE_DISTANCE == true
   if(offset > MAX_MOVE_DISTANCE) return SendClientErrorMessage(playerid, 6);
   #endif
    if(oInfo[playerid][object][created] == 1)
    {
      oInfo[playerid][object][XLoc]+=offset;
      SetObjectPos(oInfo[playerid][object][objectID], oInfo[playerid][object][XLoc], oInfo[playerid][object][YLoc], oInfo[playerid][object][ZLoc]);
      new string[130];
      format(string, sizeof(string), \"You have moved object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}) {F58282}%.2f{F5F582}m on the X plane.\", object, oInfo[playerid][object][modelID], offset);
      SendClientInfoMessage(playerid, string);
   }
   else SendClientErrorMessage(playerid, 0);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:soyo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setobjectyoffset(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setobjectyoffset(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new object, Float:offset;
     if(sscanf(params, \"if\", object, offset))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setobjectyoffset [object number] [value]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to move the chosen object number on the Y axis.\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Positive values will move the object northbound, negative values southbound.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /soyo.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
   #if USE_MAX_MOVE_DISTANCE == true
   if(offset > MAX_MOVE_DISTANCE) return SendClientErrorMessage(playerid, 6);
   #endif
    if(oInfo[playerid][object][created] == 1)
    {
      oInfo[playerid][object][YLoc]+=offset;
      SetObjectPos(oInfo[playerid][object][objectID], oInfo[playerid][object][XLoc], oInfo[playerid][object][YLoc], oInfo[playerid][object][ZLoc]);
      new string[128];
      format(string, sizeof(string), \"You have moved object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}) {F58282}%.2f{F5F582}m on the Y plane.\", object, oInfo[playerid][object][modelID], offset);
      SendClientInfoMessage(playerid, string);
   }
   else SendClientErrorMessage(playerid, 0);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:sozo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setobjectzoffset(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setobjectzoffset(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new object, Float:offset;
     if(sscanf(params, \"if\", object, offset))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setobjectzoffset [object number] [value]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to move the chosen object number on the Z axis.\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Positive values will move the object up, negative values down.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /soyo.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
   #if USE_MAX_MOVE_DISTANCE == true
   if(offset > MAX_MOVE_DISTANCE) return SendClientErrorMessage(playerid, 6);
   #endif
    if(oInfo[playerid][object][created] == 1)
    {
      oInfo[playerid][object][ZLoc]+=offset;
      SetObjectPos(oInfo[playerid][object][objectID], oInfo[playerid][object][XLoc], oInfo[playerid][object][YLoc], oInfo[playerid][object][ZLoc]);
      new string[128];
      format(string, sizeof(string), \"You have moved object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}) {F58282}%.2f{F5F582}m on the Z plane.\", object, oInfo[playerid][object][modelID], offset);
      SendClientInfoMessage(playerid, string);
   }
   else SendClientErrorMessage(playerid, 0);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:soxr(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setobjectxrotation(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setobjectxrotation(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new object, Float:rotation;
     if(sscanf(params, \"if\", object, rotation))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setobjectxrotation [object number] [value]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to set the X rotation value of the defined object number.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /soxr.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
    if(oInfo[playerid][object][created] == 1)
    {
      oInfo[playerid][object][XRot] = rotation;
      SetObjectRot(oInfo[playerid][object][objectID], oInfo[playerid][object][XRot], oInfo[playerid][object][YRot], oInfo[playerid][object][ZRot]);
      new string[140];
      format(string, sizeof(string), \"You have set the X rotation of object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}) to {F58282}%.2f{F5F582} degrees.\", object, oInfo[playerid][object][modelID], rotation);
      SendClientInfoMessage(playerid, string);
   }
   else SendClientErrorMessage(playerid, 0);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:soyr(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setobjectyrotation(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setobjectyrotation(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new object, Float:rotation;
     if(sscanf(params, \"if\", object, rotation))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setobjectyrotation [object number] [value]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to set the Y rotation value of the defined object number.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /soyr.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
    if(oInfo[playerid][object][created] == 1)
    {
      oInfo[playerid][object][YRot] = rotation;
      SetObjectRot(oInfo[playerid][object][objectID], oInfo[playerid][object][XRot], oInfo[playerid][object][YRot], oInfo[playerid][object][ZRot]);
      new string[140];
      format(string, sizeof(string), \"You have set the Y rotation of object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}) to {F58282}%.2f{F5F582} degrees.\", object, oInfo[playerid][object][modelID], rotation);
      SendClientInfoMessage(playerid, string);
   }
   else SendClientErrorMessage(playerid, 0);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:sozr(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setobjectzrotation(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setobjectzrotation(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new object, Float:rotation;
     if(sscanf(params, \"if\", object, rotation))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setobjectzrotation [object number] [value]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to set the Z rotation value of the defined object number.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /sozr.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
    if(oInfo[playerid][object][created] == 1)
    {
      oInfo[playerid][object][ZRot] = rotation;
      SetObjectRot(oInfo[playerid][object][objectID], oInfo[playerid][object][XRot], oInfo[playerid][object][YRot], oInfo[playerid][object][ZRot]);
      new string[140];
      format(string, sizeof(string), \"You have set the Z rotation of object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}) to {F58282}%.2f{F5F582} degrees.\", object, oInfo[playerid][object][modelID], rotation);
      SendClientInfoMessage(playerid, string);
   }
   else SendClientErrorMessage(playerid, 0);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:sop(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setobjectpos(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setobjectpos(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new object, Float:X, Float:Y, Float:Z;
     if(sscanf(params, \"ifff\", object, X, Y, Z))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setobjectpos [object number] [X] [Y] [Z]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to set the position of the defined object number to a certain coordinate.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /sop.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
    if(oInfo[playerid][object][created] == 1)
    {
      oInfo[playerid][object][XLoc] = X;
      oInfo[playerid][object][YLoc] = Y;
      oInfo[playerid][object][ZLoc] = Z;
      SetObjectPos(oInfo[playerid][object][objectID], oInfo[playerid][object][XLoc], oInfo[playerid][object][YLoc], oInfo[playerid][object][ZLoc]);
      new string[175];
      format(string, sizeof(string), \"You have set the position of object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}) to {F58282}%.2f{F5F582}, {F58282}%.2f{F5F582}, {F58282}%.2f{F5F582}.\", object, oInfo[playerid][object][modelID], X, Y, Z);
      SendClientInfoMessage(playerid, string);
   }
   else SendClientErrorMessage(playerid, 0);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:saoxo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setallobjectsxoffset(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setallobjectsxoffset(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new Float:offset;
     if(sscanf(params, \"f\", offset))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setallobjectsxoffset [value]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to move all your created objects on the X axis using the defined value.\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Positive values will move the objects eastbound, negative values westbound.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /saoxo.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
   #if USE_MAX_MOVE_DISTANCE == true
   if(offset > MAX_MOVE_DISTANCE) return SendClientErrorMessage(playerid, 6);
   #endif
   for(new object = 0; object < MAX_CREATED_OBJECTS; object++)
   {
      if(oInfo[playerid][object][created] == 1)
      {
         oInfo[playerid][object][XLoc]+=offset;
         SetObjectPos(oInfo[playerid][object][objectID], oInfo[playerid][object][XLoc], oInfo[playerid][object][YLoc], oInfo[playerid][object][ZLoc]);
      }
   }
   new string[90];
   format(string, sizeof(string), \"You have moved all objects you created {F58282}%.2f{F5F582}m on the X plane.\", offset);
   SendClientInfoMessage(playerid, string);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:saoyo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setallobjectsyoffset(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setallobjectsyoffset(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new Float:offset;
     if(sscanf(params, \"f\", offset))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setallobjectsyoffset [value]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to move all your created objects on the Y axis using the defined value.\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Positive values will move the objects northbound, negative values southbound.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /saoyo.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
   #if USE_MAX_MOVE_DISTANCE == true
   if(offset > MAX_MOVE_DISTANCE) return SendClientErrorMessage(playerid, 6);
   #endif
   for(new object = 0; object < MAX_CREATED_OBJECTS; object++)
   {
      if(oInfo[playerid][object][created] == 1)
      {
         oInfo[playerid][object][YLoc]+=offset;
         SetObjectPos(oInfo[playerid][object][objectID], oInfo[playerid][object][XLoc], oInfo[playerid][object][YLoc], oInfo[playerid][object][ZLoc]);
      }
   }
   new string[90];
   format(string, sizeof(string), \"You have moved all objects you created {F58282}%.2f{F5F582}m on the Y plane.\", offset);
   SendClientInfoMessage(playerid, string);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:saozo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setallobjectszoffset(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setallobjectszoffset(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new Float:offset;
     if(sscanf(params, \"f\", offset))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setallobjectszoffset [value]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to move all your created objects on the Z axis using the defined value.\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Positive values will move the objects up, negative values down.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /saozo.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
   #if USE_MAX_MOVE_DISTANCE == true
   if(offset > MAX_MOVE_DISTANCE) return SendClientErrorMessage(playerid, 6);
   #endif
   for(new object = 0; object < MAX_CREATED_OBJECTS; object++)
   {
      if(oInfo[playerid][object][created] == 1)
      {
         oInfo[playerid][object][ZLoc]+=offset;
         SetObjectPos(oInfo[playerid][object][objectID], oInfo[playerid][object][XLoc], oInfo[playerid][object][YLoc], oInfo[playerid][object][ZLoc]);
      }
   }
   new string[90];
   format(string, sizeof(string), \"You have moved all objects you created {F58282}%.2f{F5F582}m on the Z plane.\", offset);
   SendClientInfoMessage(playerid, string);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:duo(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_duplicateobject(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:duplicateobject(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
new object, Float:X, Float:Y, Float:Z;
     if(sscanf(params, \"ifff\", object, X, Y, Z))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /duplicateobject [object number] [X Offset] [Y Offset] [Z Offset]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to \\\"copy\\\" and object with a defined distance from the original object.\");
#if USE_COMMAND_SHORTCUTS == true
SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /duo.\");
#endif
}
else
{
    if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
    {
   if(oInfo[playerid][object][created] == 1)
   {
      for(new i = 0; i < MAX_CREATED_OBJECTS; i++)
      {
         if(oInfo[playerid][created] == 0)
         {
            pInfo[playerid][editobject] = i;
            oInfo[playerid][created] = 1;
            oInfo[playerid][XLoc] = oInfo[playerid][object][XLoc] + X;
            oInfo[playerid][YLoc] = oInfo[playerid][object][YLoc] + Y;
            oInfo[playerid][ZLoc] = oInfo[playerid][object][ZLoc] + Z;
            oInfo[playerid][XRot] = oInfo[playerid][object][XRot];
            oInfo[playerid][YRot] = oInfo[playerid][object][YRot];
            oInfo[playerid][ZRot] = oInfo[playerid][object][ZRot];   
            oInfo[playerid][modelID] = oInfo[playerid][object][modelID];
            oInfo[playerid][objectID] = CreateObject(oInfo[playerid][modelID], oInfo[playerid][XLoc], oInfo[playerid][YLoc], oInfo[playerid][ZLoc], oInfo[playerid][XRot], oInfo[playerid][YRot], oInfo[playerid][ZRot]);
            if(pInfo[playerid][TransferMaterial] == true)
            {
               if(oInfo[playerid][object][usesmaterial] == 1)
               {
                  oInfo[playerid][usesmaterial]    = 1;
                  oInfo[playerid][matindex]       = oInfo[playerid][object][matindex];
                  oInfo[playerid][matmodel]       = oInfo[playerid][object][matmodel];
                  oInfo[playerid][indexused]       = 1;
                  oInfo[playerid][modelused]       = 1;
                  oInfo[playerid][txdused]       = 1;
                  oInfo[playerid][textureused]    = 1;
                  oInfo[playerid][colorused]       = 1;
                  new str[12], str2[16], str3[10];
                  new newf[20], newf2[20], newf3[20];
                  new txdname[25], texturename[25], color[25];
                  format(str, sizeof(str), \"%i_txdname\", object);
                  format(str2, sizeof(str2), \"%i_texturename\", object);
                  format(str3, sizeof(str3), \"%i_color\", object);
                  GetPVarString(playerid, str, txdname, sizeof(txdname));
                  GetPVarString(playerid, str2, texturename, sizeof(texturename));
                  GetPVarString(playerid, str3, color, sizeof(color));
                  format(newf, sizeof(newf), \"%i_txdname\", i);
                  format(newf2, sizeof(newf2), \"%i_texturename\", i);
                  format(newf3, sizeof(newf3), \"%i_color\", i);
                  SetPVarString(playerid, newf, txdname);
                  SetPVarString(playerid, newf2, texturename);
                  SetPVarString(playerid, newf3, color);
                  ChangeObjectMaterial(playerid, i);   
               }
            }
            else
               oInfo[playerid][usesmaterial] = 0;
            pInfo[playerid][totalobjects]++;
            new dupinfo[180], numinfo[70];
            format(dupinfo, sizeof(dupinfo), \"You have duplicated object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}) with the offset {F58282}%.2f{F5F582}m, {F58282}%.2f{F5F582}m, {F58282}%.2f{F5F582}m.\", object, oInfo[playerid][object][modelID], X, Y, Z);
            format(numinfo, sizeof(numinfo), \"The number of the new created object is {F58282}%i{F5F582}.\", i);
            SendClientInfoMessage(playerid, dupinfo);
            SendClientInfoMessage(playerid, numinfo);
            #if ALLOW_EDIT_OBJECT_ON_DUPLICATE == true
            if(pInfo[playerid][EditObjectOnDuplicate] == true)
            {
               pInfo[playerid][editobject] = i;
               EditObject(playerid, oInfo[playerid][objectID]);
            }
            #endif
            break;
         }
      }
   }
   else SendClientErrorMessage(playerid, 0);
}
else
{
    SendClientErrorMessage(playerid, 2);
}
}
     return 1;
}
CMD:som(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_setobjectmaterial(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:setobjectmaterial(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
if(pInfo[playerid][useMaterialDialog] == true)
{
new object;
if(sscanf(params, \"i\", object))
{
   SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setobjectmaterial [object number]\");
   SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to change the texture of the defined object number.\");
   #if USE_COMMAND_SHORTCUTS == true
   SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /som.\");
   #endif
}
else
{
   if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
   {
      if(oInfo[playerid][object][created] == 1)
      {
         pInfo[playerid][editobject] = object;
         ShowPlayerMaterialDialog(playerid, object);
      }
      else SendClientErrorMessage(playerid, 0);
   }
   else
   {
      SendClientErrorMessage(playerid, 2);
   }
}
}
else
{
new object, materialindex, mamodel, txdname[50], texturename[50], color[50];
if(sscanf(params, \"iiis[50]s[50]s[50]\", object, materialindex, mamodel, txdname, texturename, color))
{
   SendClientMessage(playerid, COLOR_USAGE, \"Usage: /setobjectmaterial [object number] [materialindex] [modelid] [txdname] [texturename] [color]\");
   SendClientMessage(playerid, COLOR_USAGE2, \"> Allows you to change the texture of the defined object number.\");
   SendClientMessage(playerid, COLOR_USAGE2, \"> Materialindex = The part of the object you want to change.\");
   SendClientMessage(playerid, COLOR_USAGE2, \"> Modelid = The ID of the model the replacement texture is from (Use \\\"0\\\" for transparent).\");
   SendClientMessage(playerid, COLOR_USAGE2, \"> Txdname = The name of the .txd file which contains the texture (Use \\\"none\\\" for transparent).\");
   SendClientMessage(playerid, COLOR_USAGE2, \"> Texturename = The name of the texture (Use \\\"none\\\" for transparent).\");
   SendClientMessage(playerid, COLOR_USAGE2, \"> Color = The color you want to paint the texture with in AABBGGRR format. (Use \\\"0\\\" for default texture color).\");
   #if USE_COMMAND_SHORTCUTS == true
   SendClientMessage(playerid, COLOR_USAGE2, \"> The shortcut for this command is /som.\");
   #endif
}
else
{
   if(pInfo[playerid][totalobjects] < MAX_CREATED_OBJECTS)
   {
      if(oInfo[playerid][object][created] == 1)
      {
         pInfo[playerid][editobject] = object;
         oInfo[playerid][pInfo[playerid][editobject]][matindex]       = materialindex;
         oInfo[playerid][pInfo[playerid][editobject]][matmodel]       = mamodel;
         oInfo[playerid][pInfo[playerid][editobject]][txdused]       = 1;
         oInfo[playerid][pInfo[playerid][editobject]][textureused]    = 1;
         oInfo[playerid][pInfo[playerid][editobject]][colorused]    = 1;
         oInfo[playerid][pInfo[playerid][editobject]][modelused]    = 1;
         oInfo[playerid][pInfo[playerid][editobject]][indexused]    = 1;
         new str[20];
         format(str, sizeof(str), \"%i_txdname\", pInfo[playerid][editobject]);
         SetPVarString(playerid, str, txdname);
         new str2[20];
         format(str2, sizeof(str2), \"%i_texturename\", pInfo[playerid][editobject]);
         SetPVarString(playerid, str2, texturename);
         new str3[20];
         format(str3, sizeof(str3), \"%i_color\", pInfo[playerid][editobject]);
         if(!strlen(color))
            SetPVarString(playerid, str3, \"0\");
         else
            SetPVarString(playerid, str3, color);
         ChangeObjectMaterial(playerid, pInfo[playerid][editobject]);
      }
      else SendClientErrorMessage(playerid, 0);
   }
   else
   {
      SendClientErrorMessage(playerid, 2);
   }
}
}
     return 1;
}
CMD:editorsettings(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
ShowPlayerSettingsMenu(playerid);
return 1;
}
CMD:editorcommands(playerid, params[])
{
ShowPlayerCommandHelp(playerid);
return 1;
}
CMD:esettingshelp(playerid, params[])
{
ShowPlayerSettingsHelp(playerid);
return 1;
}
CMD:fm(playerid, params[])
{
#if USE_COMMAND_SHORTCUTS == true
return cmd_flyeditor(playerid, params);
#else
SendClientErrorMessage(playerid, 8);
#endif
}
CMD:flyeditor(playerid, params[])
{
if(pInfo[playerid][editing] != true) return SendClientErrorMessage(playerid, 7);
if(pInfo[playerid][flyeditor] == 0)
Startflyeditor(playerid);
else
Endflyeditor(playerid);
return 1;
}
CMD:toggleeditor(playerid, params[])
{
#if TOGGLED_ONLY == true
new pID;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_WARNING, \"Sorry, this command can only be used by RCON admins.\");
if(sscanf(params, \"r\", pID))
{
SendClientMessage(playerid, COLOR_USAGE, \"Usage: /toggleeditor [playerid]\");
SendClientMessage(playerid, COLOR_USAGE2, \"> Allows a player to use the object editor.\");
}
else
{
if(IsPlayerConnected(pID))
{
   if(pInfo[playerid][canuse] == 0)
   {
      pInfo[playerid][canuse] = 1;
      new togglename[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME];
      GetPlayerName(pID, togglename, MAX_PLAYER_NAME);
      GetPlayerName(playerid, adminname, MAX_PLAYER_NAME);
      new string[100], string2[100];
      format(string, sizeof(string), \"You have allowed %s to use the object editor.\", togglename);
      format(string2, sizeof(string2), \"Admin %s has allowed you to use the object editor.\", adminname);
      SendClientInfoMessage(playerid, string);
      SendClientInfoMessage(pID, string2);
   }
   else
   {
      pInfo[playerid][canuse] = 0;
      new togglename[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME];
      GetPlayerName(pID, togglename, MAX_PLAYER_NAME);
      GetPlayerName(playerid, adminname, MAX_PLAYER_NAME);
      new string[100], string2[100];
      format(string, sizeof(string), \"You have taken %s the permission to use the object editor.\", togglename);
      format(string2, sizeof(string2), \"Admin %s has taken you the permission to use the object editor.\", adminname);
      SendClientInfoMessage(playerid, string);
      SendClientInfoMessage(pID, string2);
      if(pInfo[pID][editing] == true)
      {
         SendClientMessage(playerid, -1, \"[Editor {F58282}OFF{FFFFFF}]\");
         DeleteAllObjects(playerid);
         ResetAllValues(playerid);
         SendClientInfoMessage(playerid, \"You have left the editor. | All your objects have been automatically deleted.\");
         pInfo[playerid][editing] = false;
      }
   }
}
else SendClientErrorMessage(playerid, 10);
}
#else
SendClientMessage(playerid, COLOR_WARNING, \"The editor is free for everyone, you don\'t have to give permissions.\");
#endif
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK))
{
if((pInfo[playerid][flyeditor] == 1) && (pInfo[playerid][editing] == true))
{
   if(pInfo[playerid][totalobjects] == 0) return SendClientErrorMessage(playerid, 1);
   SelectObject(playerid);
}
}
return 1;
}
public OnPlayerUpdate(playerid)
{
if((pInfo[playerid][editing] == true) && (pInfo[playerid][flyeditor] == 1))
{
new keys,ud,lr;
GetPlayerKeys(playerid,keys,ud,lr);
if(pInfo[playerid][mode] && (GetTickCount() - pInfo[playerid][lastmove] > 100))
{
    MoveCamera(playerid);
}
if(pInfo[playerid][udold] != ud || pInfo[playerid][lrold] != lr)
{
   if((pInfo[playerid][udold] != 0 || pInfo[playerid][lrold] != 0) && ud == 0 && lr == 0)
   {
      StopPlayerObject(playerid, pInfo[playerid][flyobject]);
      pInfo[playerid][mode]      = 0;
      pInfo[playerid][accelmul]  = 0.0;
   }
   else
   {
      pInfo[playerid][mode] = GetMoveDirectionFromKeys(ud, lr);
      MoveCamera(playerid);
   }
}
pInfo[playerid][udold] = ud; pInfo[playerid][lrold] = lr;
return 0;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_MAP_SAVENAME:
{
   if(response)
   {
      if(strlen(inputtext))
      {
         SaveMap(playerid, inputtext);
      }
      else
      {
         new dg1[101];
         format(dg1, sizeof(dg1), \"Enter the name of the file you want to save the objects in:\\n\\n{F58282}You need to enter a file name.\");
         ShowPlayerDialog(playerid, DIALOG_MAP_SAVENAME, DIALOG_STYLE_INPUT,\"Save name\",dg1,\"Save\",\"Cancel\");
      }
   }
}
case DIALOG_MAP_EXPORTNAME:
{
   if(response)
   {
      if(strlen(inputtext))
      {
         ExportMap(playerid, inputtext);
      }
      else
      {
         new dg1[103];
         format(dg1, sizeof(dg1), \"Enter the name of the file you want to export the objects to:\\n\\n{F58282}You need to enter a file name.\");
         ShowPlayerDialog(playerid, DIALOG_MAP_EXPORTNAME, DIALOG_STYLE_INPUT,\"Export name\",dg1,\"Export\",\"Cancel\");
      }
   }
}
case DIALOG_MAP_LOAD:
{
    if(response)
    {
        if(strlen(inputtext))
        {
         LoadMap(playerid, inputtext);
      }
      else
      {
         new dg1[86];
         format(dg1, sizeof(dg1), \"Enter the name of the file you want to load:\\n\\n{F58282}You need to enter a file name.\");
         ShowPlayerDialog(playerid, DIALOG_MAP_LOAD, DIALOG_STYLE_INPUT, \"Load map\",dg1,\"Load\",\"Cancel\");
      }
    }
}
case DIALOG_SELECTMENU:
{
   if(response)
   {
      switch(listitem)
      {
         case 0:
         {
            EditObject(playerid, oInfo[playerid][pInfo[playerid][editobject]][objectID]);
         }   
         case 1:
         {
            ShowPlayerDialog(playerid, DIALOG_CHANGEMODEL, DIALOG_STYLE_INPUT,\"Replacement model\",\"Enter the model ID you want to replace the object with\",\"Replace\",\"Cancel\");
         }
         case 2:
         {
            new object = pInfo[playerid][editobject];
            DestroyObject(oInfo[playerid][object][objectID]);
            pInfo[playerid][totalobjects]--;
            new string[88];
            format(string, sizeof(string), \"You have succesfully deleted object number {F58282}%i{F5F582} (Model {F58282}%i{F5F582}).\", object, oInfo[playerid][object][modelID]);
            SendClientMessage(playerid, COLOR_INFO, string);
            oInfo[playerid][object][created]       = 0;
            oInfo[playerid][object][objectID]      = INVALID_OBJECT_ID;
            oInfo[playerid][object][modelID]       = 0;
            oInfo[playerid][object][XLoc]          = 0.0;
            oInfo[playerid][object][YLoc]          = 0.0;
            oInfo[playerid][object][ZLoc]          = 0.0;
            oInfo[playerid][object][XRot]          = 0.0;
            oInfo[playerid][object][YRot]          = 0.0;
            oInfo[playerid][object][ZRot]          = 0.0;
            oInfo[playerid][object][indexused]       = 0;
            oInfo[playerid][object][modelused]       = 0;
            oInfo[playerid][object][txdused]       = 0;
            oInfo[playerid][object][textureused]    = 0;
            oInfo[playerid][object][colorused]       = 0;
            oInfo[playerid][object][matindex]       = -1;
            oInfo[playerid][object][matmodel]       = -1;
            new str1[20], str2[20], str3[20];
            format(str1, sizeof(str1), \"%i_txdname\", object);
            format(str2, sizeof(str2), \"%i_texturename\", object);
            format(str3, sizeof(str3), \"%i_color\", object);
            DeletePVar(playerid, str1);
            DeletePVar(playerid, str2);
            DeletePVar(playerid, str3);
            oInfo[playerid][object][usesmaterial] = 0;
         }
      }
   }
}
case DIALOG_CHANGEMODEL:
{
   if(response)
   {
      if(strlen(inputtext))
      {
         if(IsNumeric(inputtext))
         {
            new model, oldmodel;
            new object = pInfo[playerid][editobject];
            oldmodel = oInfo[playerid][object][modelID];
            model = strval(inputtext);
            DestroyObject(oInfo[playerid][object][objectID]);
            oInfo[playerid][object][objectID] = CreateObject(model, oInfo[playerid][object][XLoc],oInfo[playerid][object][YLoc],oInfo[playerid][object][ZLoc],oInfo[playerid][object][XRot],oInfo[playerid][object][YRot],oInfo[playerid][object][ZRot]);
            oInfo[playerid][object][modelID] = model;
            new string[128];
            if(pInfo[playerid][KeepMaterial] == true)
               ChangeObjectMaterial(playerid, object);
            else
               ResetObjectMaterial(playerid, object);
            format(string, sizeof(string), \"You succesfully replaced the model of object {F58282}%i{F5F582} (Model: {F58282}%i{F5F582}) with model {F58282}%i{F5F582}.\", object, oldmodel, model);
            SendClientInfoMessage(playerid, string);
         }
         else ShowPlayerDialog(playerid, DIALOG_CHANGEMODEL, DIALOG_STYLE_INPUT,\"Replacement model\",\"Enter the model ID you want to replace the object with\\n\\n{91FF91}You may enter numbers only.\",\"Replace\",\"Cancel\");
      }
      else ShowPlayerDialog(playerid, DIALOG_CHANGEMODEL, DIALOG_STYLE_INPUT,\"Replacement model\",\"Enter the model ID you want to replace the object with\\n\\n{91FF91}You need to enter a value.\",\"Replace\",\"Cancel\");
   }
}
case DIALOG_SETTINGS:
{
   if(response)
   {
      switch(listitem)
      {
         case 0:
         {
            #if ALLOW_EDIT_OBJECT_ON_CREATE == true
               if(pInfo[playerid][EditObjectOnCreate] == true)
                  pInfo[playerid][EditObjectOnCreate] = false;
               else
                  pInfo[playerid][EditObjectOnCreate] = true;
            #endif
         }
         case 1:
         {
            #if ALLOW_EDIT_OBJECT_ON_DUPLICATE == true
               if(pInfo[playerid][EditObjectOnDuplicate] == true)
                  pInfo[playerid][EditObjectOnDuplicate] = false;
               else
                  pInfo[playerid][EditObjectOnDuplicate] = true;
            #endif
         }
         case 2:
         {
            #if ALLOW_USE_MATERIAL_CHANGE_DIALOG == true
               if(pInfo[playerid][useMaterialDialog] == true)
                  pInfo[playerid][useMaterialDialog] = false;
               else
                  pInfo[playerid][useMaterialDialog] = true;
            #endif
         }
         case 3:
         {
            #if ALLOW_TRANSFER_MATERIAL == true
               if(pInfo[playerid][TransferMaterial] == true)
                  pInfo[playerid][TransferMaterial] = false;
               else
                  pInfo[playerid][TransferMaterial] = true;
            #endif
         }
         case 4:
         {
            #if ALLOW_KEEP_MATERIAL == true
               if(pInfo[playerid][KeepMaterial] == true)
                  pInfo[playerid][KeepMaterial] = false;
               else
                  pInfo[playerid][KeepMaterial] = true;
            #endif
         }
         case 5:
         {
            #if ALLOW_USE_CROSS == true
               if(pInfo[playerid][useCross] == true)
               {
                  pInfo[playerid][useCross] = false;
                  PlayerTextDrawHide(playerid, Cross[0]);
                  PlayerTextDrawHide(playerid, Cross[1]);
               }
               else
               {
                  pInfo[playerid][useCross] = true;
                  if(pInfo[playerid][flyeditor] == 1)
                  {
                     PlayerTextDrawShow(playerid, Cross[0]);
                     PlayerTextDrawShow(playerid, Cross[1]);
                  }
               }
            #endif
         }
      }
      ShowPlayerSettingsMenu(playerid);
   }
}
case DIALOG_MATERIALS:
{
   if(response)
   {
      switch(listitem)
      {
         case 0: //materialindex
         {
            ShowPlayerDialog(playerid, DIALOG_MATERIALINDEX, DIALOG_STYLE_INPUT, \"Materialindex\",\"Enter the index (part) you want to change of the object:\",\"Set\",\"Back\");
         }
         case 1: //modelid
         {
            new dg1[135];
            format(dg1, sizeof(dg1), \"Enter the model ID of the object on which the replacement texture is located\\n\\n{F5F582}Note: {A9C4E4}Use \\\"0\\\" for alpha (transparent)\");
            ShowPlayerDialog(playerid, DIALOG_MODELID, DIALOG_STYLE_INPUT,\"Model ID\",dg1,\"Set\",\"Back\");
         }
         case 2: //txdname
         {
            new dg1[131];
            format(dg1, sizeof(dg1), \"Enter the name of the .txd file the replacement texture is located at\\n\\n{F5F582}Note: {A9C4E4}Use \\\"none\\\" for alpha (transparent)\");
            ShowPlayerDialog(playerid, DIALOG_TXDNAME, DIALOG_STYLE_INPUT,\"TXD file name\",dg1,\"Set\",\"Back\");
         }
         case 3: //texturename
         {
            new dg1[121];
            format(dg1, sizeof(dg1), \"Enter the name of the texture you want to put on the object\\n\\n{F5F582}Note: {A9C4E4}Use \\\"none\\\" for alpha (transparent)\");
            ShowPlayerDialog(playerid, DIALOG_TEXTURENAME, DIALOG_STYLE_INPUT,\"Texture name\",dg1,\"Set\",\"Back\");
         }
         case 4: //color
         {
            new dg1[64], dg2[150], dg3[64], dial[300];
            format(dg1, sizeof(dg1), \"Enter a color you want to pain the texture with\");
            format(dg2, sizeof(dg2), \"{F58282}Important: {A9C4E4}The color has to be in {FFFFFF}AA{0069FF}BB{00FF00}GG{FF0000}RR {A9C4E4}format.\\nExample: FF00FF00 (green)\");
            format(dg3, sizeof(dg3), \"\\n{F5F582}Note: {A9C4E4}Use \\\"0\\\" to use the default color of the texture.\");
            format(dial, sizeof(dial), \"%s\\n%s\\n%s\", dg1, dg2, dg3);
            ShowPlayerDialog(playerid, DIALOG_COLOR, DIALOG_STYLE_INPUT,\"Color\",dial,\"Set\",\"Back\");
         }
         case 5: //continue
         {
            if(IsAllFilledOut(playerid, pInfo[playerid][editobject]))
               ChangeObjectMaterial(playerid, pInfo[playerid][editobject]);
            else ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
         }
         case 6: //remove texture
         {
            if(oInfo[playerid][pInfo[playerid][editobject]][usesmaterial] == 1)
               ResetObjectMaterial(playerid, pInfo[playerid][editobject]);
            else ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
         }
      }
   }
}
case DIALOG_MATERIALINDEX:
{
   if(response)
   {
      if(strlen(inputtext))
      {
         if(IsNumeric(inputtext))
         {
            oInfo[playerid][pInfo[playerid][editobject]][indexused] = 1;
            oInfo[playerid][pInfo[playerid][editobject]][matindex] = strval(inputtext);
            ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
         }
         else ShowPlayerDialog(playerid, DIALOG_MATERIALINDEX, DIALOG_STYLE_INPUT, \"Materialindex\",\"Enter the index (part) you want to change of the object:\\n{F58282}You may enter numbers only.\",\"Set\",\"Back\");
      }
      else ShowPlayerDialog(playerid, DIALOG_MATERIALINDEX, DIALOG_STYLE_INPUT, \"Materialindex\",\"Enter the index (part) you want to change of the object:\\n{F58282}You need to enter a value.\",\"Set\",\"Back\");
   }
   else ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
}
case DIALOG_MODELID:
{
   if(response)
   {
      if(strlen(inputtext))
      {
         if(IsNumeric(inputtext))
         {
            oInfo[playerid][pInfo[playerid][editobject]][modelused] = 1;
            oInfo[playerid][pInfo[playerid][editobject]][matmodel] = strval(inputtext);
            ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
         }
         else
         {
            new dg1[135], dg2[35], dial[200];
            format(dg1, sizeof(dg1), \"Enter the model ID of the object on which the replacement texture is located\\n\\n{F5F582}Note: {A9C4E4}Use \\\"0\\\" for alpha (transparent)\");
            format(dg2, sizeof(dg2), \"{F58282}You may only enter numbers.\");
            format(dial, sizeof(dial), \"%s\\n\\n%s\", dg1, dg2);
            ShowPlayerDialog(playerid, DIALOG_MODELID, DIALOG_STYLE_INPUT,\"Model ID\",dial,\"Set\",\"Back\");
         }
      }
      else
      {
         new dg1[135], dg2[35], dial[200];
         format(dg1, sizeof(dg1), \"Enter the model ID of the object on which the replacement texture is located\\n\\n{F5F582}Note: {A9C4E4}Use \\\"0\\\" for alpha (transparent)\");
         format(dg2, sizeof(dg2), \"{F58282}You need to enter a value.\");
         format(dial, sizeof(dial), \"%s\\n\\n%s\", dg1, dg2);
         ShowPlayerDialog(playerid, DIALOG_MODELID, DIALOG_STYLE_INPUT,\"Model ID\",dial,\"Set\",\"Back\");
      }
   }
   else ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
}
case DIALOG_TXDNAME:
{
   if(response)
   {
      if(strlen(inputtext))
      {
         new str[20];
         format(str, sizeof(str), \"%i_txdname\", pInfo[playerid][editobject]);
         SetPVarString(playerid, str, inputtext);
         oInfo[playerid][pInfo[playerid][editobject]][txdused] = 1;
         ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
      }
      else
      {
         new dg1[131], dg2[35], dial[200];
         format(dg1, sizeof(dg1), \"Enter the name of the .txd file the replacement texture is located at\\n\\n{F5F582}Note: {A9C4E4}Use \\\"none\\\" for alpha (transparent)\");
         format(dg2, sizeof(dg2), \"{F58282}You need to enter a name.\");
         format(dial, sizeof(dial), \"%s\\n\\n%s\", dg1, dg2);
         ShowPlayerDialog(playerid, DIALOG_TXDNAME, DIALOG_STYLE_INPUT,\"TXD file name\",dial,\"Set\",\"Back\");
      }
   }
   else ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
}
case DIALOG_TEXTURENAME:
{
   if(response)
   {
      if(strlen(inputtext))
      {
         new str[20];
         format(str, sizeof(str), \"%i_texturename\", pInfo[playerid][editobject]);
         SetPVarString(playerid, str, inputtext);
         oInfo[playerid][pInfo[playerid][editobject]][textureused] = 1;
         ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
      }
      else
      {
         new dg1[121], dg2[35], dial[200];
         format(dg1, sizeof(dg1), \"Enter the name of the texture you want to put on the object\\n\\n{F5F582}Note: {A9C4E4}Use \\\"none\\\" for alpha (transparent)\");
         format(dg2, sizeof(dg2), \"{F58282}You need to enter a text.\");
         format(dial, sizeof(dial), \"%s\\n\\n%s\", dg1, dg2);
         ShowPlayerDialog(playerid, DIALOG_TEXTURENAME, DIALOG_STYLE_INPUT,\"Texture name\",dial,\"Set\",\"Back\");
      }
   }
   else ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
}
case DIALOG_COLOR:
{
   if(response)
   {
      if(strlen(inputtext))
      {
         new str[20];
         format(str, sizeof(str), \"%i_color\", pInfo[playerid][editobject]);
         SetPVarString(playerid, str, inputtext);
         oInfo[playerid][pInfo[playerid][editobject]][colorused] = 1;
         ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
      }
      else
      {
         new dg1[50], dg2[150], dg3[50], dg4[50], dial[512];
         format(dg1, sizeof(dg1), \"Enter a color you want to paint the texture with.\");
         format(dg2, sizeof(dg2), \"{F58282}Important: {A9C4E4}The color has to be in {FFFFFF}AA{0069FF}BB{00FF00}GG{FF0000}RR {A9C4E4}format.\\n\\tExample: FF00FF00 (green).\");
         format(dg3, sizeof(dg3), \"\\n{F5F582}Note: {A9C4E4}Use \\\"0\\\" for alpha (transparent).\");
         format(dg4, sizeof(dg4), \"{F58282}You need to enter a color.\");
         format(dial, sizeof(dial), \"%s\\n%s\\n\\n%s\\n\\n%s\", dg1, dg2, dg3, dg4);
         ShowPlayerDialog(playerid, DIALOG_COLOR, DIALOG_STYLE_INPUT,\"Color\",dial,\"Set\",\"Back\");
      }
   }
   else ShowPlayerMaterialDialog(playerid, pInfo[playerid][editobject]);
}
case DIALOG_EDITORCOMMANDS:
{
   if(!response)
   {
      ShowPlayerCommandHelp2(playerid);
   }
}
case DIALOG_EDITORCOMMANDS2:
{
   if(response)
   {
      ShowPlayerCommandHelp(playerid);
   }
}
}
return 1;
}
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
if(objectid == oInfo[playerid][pInfo[playerid][editobject]][objectID])
{
if(response == EDIT_RESPONSE_FINAL)
{
   new object = pInfo[playerid][editobject];
   oInfo[playerid][object][XLoc] = fX;
   oInfo[playerid][object][YLoc] = fY;
   oInfo[playerid][object][ZLoc] = fZ;
   oInfo[playerid][object][XRot] = fRotX;
   oInfo[playerid][object][YRot] = fRotY;
   oInfo[playerid][object][ZRot] = fRotZ;
   SetObjectPos(oInfo[playerid][object][objectID], fX, fY, fZ);
   SetObjectRot(oInfo[playerid][object][objectID], fRotX, fRotY, fRotZ);
   new string[128];
   format(string, sizeof(string),\"You have finished editing object number {F58282}%i{F5F582}

9
Segítségkérés / RCON Bejelentkezés
« Dátum: 2012. október 14. - 14:17:46 »
Sziasztok!
RCON ba hogy tudok bejelentkezni?

10
Segítségkérés / Object Editor használata
« Dátum: 2012. október 14. - 12:53:46 »
A szerverben már bent van de hogy tudom használni?

11
Segítségkérés / PWN hez AMX
« Dátum: 2012. október 14. - 12:51:02 »
Sziasztok!
Az lenne a kérdésem hogy PWN hez hogy tudnák AMX et csinálni?

12
Segítségkérés / Berakási hely
« Dátum: 2012. október 14. - 09:26:28 »
Az ijen kodokat mint ezek :
 
#include <a_samp>
#include <zcmd> //fontos, hogy használjuk! ZCMD alapon van a parancs, tehát azért kell hozzá!
//töltsük fel a webtárhelyünkre a kívánt zenét!
CMD:karpatia(playerid)
{
    PlayAudioStreamForPlayer(playerid, \"http://kingoftheroad.ewk.hu/feltolt/karpatia---palinka.mp3\"); //a feltöltött zenénk letöltõ linke...
        return 1;
}
//most állítsuk meg a zenét.
CMD:stopzene(playerid)
{
    StopAudioStreamForPlayer(playerid);
    return 1;
}

 
Hova kel rakni a szerverbe??
Senki?? :SS

13
Segítségkérés / Rádio szerverbe+leírás
« Dátum: 2012. október 13. - 22:54:06 »
Sziasztok!
Le írnátok hogy tudom berakni a rádiokat a szerverbe?(Radio1...stb)
(Kezdô vagyok)

14
Archívum / [HUN][email protected](Kezdõ Bónusz)
« Dátum: 2012. október 12. - 09:47:14 »
   Sziasztok,beszeretném nektek mutatni a Kamion-Ace szervert!
Fontos tudnivalók:
A szerveren különbözõ munkák közül választhatsz, kamionos, pizzafutár, pilóta stb.
A kezdõ játékosok kezdõ bónuszt kapnak, 100
pontot és 2.000.000$-t!
Ezeket egy fent lévõ admintól kapjátok meg!
_________________________________________
Szabályok:
1. Út jobb oldalán haladj !
2. Ne legyél tiszteletlen a játékosokkal és az adminokkal !
3. Ne legyél felelõtlen ne hagyd az út közepén a jármûved !
4. Ne hackelj és ne használj semmiféle külsõ programot !
5. Ne floodolj a chatbe más szerverek reklámozása tilos !
6. Ne lopd el mások munkajármûvét !
7. Amennyiben dömperes munkát végzel ne gázolj át másokon!
8. Mindenki csak az adott jármûvet használhatja munka közben!
9. A convoy akadályozása 1 nap ban-t von maga után!
10. Adminkéregetés azonnali némítástvon maga után. (10perc)
_________________________________________________
Tulajok: [M]aRk - Atesz
Fõadmin: Sadeoo98 - Oodri
Fõadmin helyettesek: Titi1234 - Cobra11
Admin: David0531
________________________
Szerver Bemutató Video:
http://www.youtube.com/watch?feature=player_embedded&v=OTbShcbjJis#!
____________________________
Elérhetõségek:
A szerver e-mail címe a [mod]Eltávolítva[/mod]!
A tárgy nélküli üzenetek azonnal törlésre kerülnek!
 Adminkéregetõ üzeneteket mellõzzétek!
tel:0670-249-4998
__________________________
Szerver Ip: [mod]Eltávolítva[/mod]
Szerver Honlap: [mod]Eltávolítva[/mod]
Sok szeretetel várunk titeket! :$

Oldalak: [1]
SimplePortal 2.3.7 © 2008-2024, SimplePortal