16.07.2012, 21:48
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:
Then I put it this way:
The System Rescue accessories from my server is like this:
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.
Code's default application:
PHP код:
public OnPlayerEditAttachedObject( playerid, response, index, modelid, boneid,
Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ,
Float:fRotX, Float:fRotY, Float:fRotZ,
Float:fScaleX, Float:fScaleY, Float: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(playerid, 0xFFFFFFFF, "You finished editing an attached object");
return 1;
}
PHP код:
public OnPlayerEditAttachedObject( playerid, response, index)
{
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(playerid, slotselection[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(playerid, 0xFFFFFFFF, "You finished editing an attached object");
return 1;
}
PHP код:
enum ptInfo
{
ptModelID,
ptBone,
Float:ptPosX,
Float:ptPosY,
Float:ptPosZ,
Float:ptRotX,
Float:ptRotY,
Float:ptRotZ,
Float:ptScaleX,
Float:ptScaleY,
Float:ptScaleZ
};
Sorry for my english.