Acessories System
#1

Hello everyone, Well I wanted a help from you to help resolve a condition. Well is this I have a system of accessories on my server it has a way to edit the object's position in dialog, the more I wanted for him to edit the type of application posiзгos sa-mp attachments, I adapted it to my gamemode fucionou everything right over there by the time click on the icon to save it does not save it or know what happens look at the code:

Code's default application:
PHP код:
public OnPlayerEditAttachedObjectplayeridresponseindexmodelidboneid,
                                   
Float:fOffsetXFloat:fOffsetYFloat:fOffsetZ,
                                   
Float:fRotXFloat:fRotYFloat:fRotZ,
                                   
Float:fScaleXFloat:fScaleYFloat:fScaleZ )
{
    new 
debug_string[256+1];
    
format(debug_string,256,"SetPlayerAttachedObject(playerid,%d,%d,%d,%f,%f,%f,%f,%f,%f,%f,%f,%f)",
        
index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
    print(
debug_string);
    
//SendClientMessage(playerid, 0xFFFFFFFF, debug_string);
    
    
SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
    
SendClientMessage(playerid0xFFFFFFFF"You finished editing an attached object");
    
    return 
1;

Then I put it this way:
PHP код:
public OnPlayerEditAttachedObjectplayeridresponseindex)
{
    new 
debug_string[256+1];
    
format(debug_string,256,"SetPlayerAttachedObject(playerid,%d,%d,%d,%f,%f,%f,%f,%f,%f,%f,%f,%f)",
        
index,PlayerToyInfo[playerid][slotselection[playerid]][ptModelID],
    
PlayerToyInfo[playerid][slotselection[playerid]][ptBone], PlayerToyInfo[playerid][slotselection[playerid]][ptPosX],
    
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY], PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ],
    
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX], PlayerToyInfo[playerid][slotselection[playerid]][ptRotY],
    
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ], PlayerToyInfo[playerid][slotselection[playerid]][ptScaleX],
    
PlayerToyInfo[playerid][slotselection[playerid]][ptScaleY], PlayerToyInfo[playerid][slotselection[playerid]][ptScaleZ]);
    print(
debug_string);
    
//SendClientMessage(playerid, 0xFFFFFFFF, debug_string);
    
SetPlayerAttachedObject(playeridslotselection[playerid], PlayerToyInfo[playerid][slotselection[playerid]][ptModelID],
    
PlayerToyInfo[playerid][slotselection[playerid]][ptBone], PlayerToyInfo[playerid][slotselection[playerid]][ptPosX],
    
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY], PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ],
    
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX], PlayerToyInfo[playerid][slotselection[playerid]][ptRotY],
    
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ], PlayerToyInfo[playerid][slotselection[playerid]][ptScaleX],
    
PlayerToyInfo[playerid][slotselection[playerid]][ptScaleY], PlayerToyInfo[playerid][slotselection[playerid]][ptScaleZ]);
            
    
SendClientMessage(playerid0xFFFFFFFF"You finished editing an attached object");
            
    return 
1;

The System Rescue accessories from my server is like this:
PHP код:
enum ptInfo
{
    
ptModelID,
    
ptBone,
    
Float:ptPosX,
    
Float:ptPosY,
    
Float:ptPosZ,
    
Float:ptRotX,
    
Float:ptRotY,
    
Float:ptRotZ,
    
Float:ptScaleX,
    
Float:ptScaleY,
    
Float:ptScaleZ
}; 
Well that's it if I did something wrong or know if it is missing some code helps me ae porfavor's it folks. I am waiting vlw.



Sorry for my english.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)