04.06.2016, 01:53
hola vi un sistema de toys en el foro pero solo guarda un slot osea solo un toys y yo lo quiero hacer de mas si me pueden ayudar le agradesco
cargar
Quote:
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 INI:File = INI_Open(UserPath(playerid)); INI_WriteInt(File,"pindex",index); INI_WriteInt(File,"pmodelid",modelid); INI_WriteInt(File,"pboneid",boneid); INI_WriteFloat(File,"pfOffsetX",fOffsetX); INI_WriteFloat(File,"pfOffsetY",fOffsetY); INI_WriteFloat(File,"pfOffsetZ",fOffsetZ); INI_WriteFloat(File,"pfRotX",fRotX); INI_WriteFloat(File,"pfRotY",fRotY); INI_WriteFloat(File,"pfRotZ",fRotZ); INI_WriteFloat(File,"pfScaleX",fScaleX); INI_WriteFloat(File,"pfScaleY",fScaleY); INI_WriteFloat(File,"pfScaleZ",fScaleZ); INI_Close(File); PlayerInfo[playerid][pindex] = index; PlayerInfo[playerid][pmodelid] = modelid; PlayerInfo[playerid][pboneid] = boneid; PlayerInfo[playerid][pfOffsetX] = fOffsetX; PlayerInfo[playerid][pfOffsetY] = fOffsetY; PlayerInfo[playerid][pfOffsetZ] = fOffsetZ; PlayerInfo[playerid][pfRotX] = fRotX; PlayerInfo[playerid][pfRotY] = fRotY; PlayerInfo[playerid][pfRotZ] = fRotZ; PlayerInfo[playerid][pfScaleX] = fScaleX; PlayerInfo[playerid][pfScaleY] = fScaleY; PlayerInfo[playerid][pfScaleZ] = fScaleZ; SetPlayerAttachedObject(playerid,index,modelid,bon eid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,f ScaleX,fScaleY,fScaleZ); SendClientMessage(playerid, 0xFFFFFFFF, "You finished editing an attached object"); return 1; } |
Quote:
forward LoadToys(playerid,name[],value[]); public LoadToys(playerid,name[],value[]) { if (!strcmp(name, "sindex")){ PlayerInfo[playerid][pindex] = strval(value); } if (!strcmp(name, "pmodelid")){ PlayerInfo[playerid][pmodelid] = strval(value); } if (!strcmp(name, "pboneid")){ PlayerInfo[playerid][pboneid] = strval(value); } if (!strcmp(name, "pfOffsetX")){ PlayerInfo[playerid][pfOffsetX] = strval(value); } if (!strcmp(name, "pfOffsetY")){ PlayerInfo[playerid][pfOffsetY] = strval(value); } if (!strcmp(name, "pfOffsetY")){ PlayerInfo[playerid][pfOffsetZ] = strval(value); } if (!strcmp(name, "pfRotX")){ PlayerInfo[playerid][pfRotX] = strval(value); } if (!strcmp(name, "pfRotY")){ PlayerInfo[playerid][pfRotY] = strval(value); } if (!strcmp(name, "pfRotZ")){ PlayerInfo[playerid][pfRotZ] = strval(value); } if (!strcmp(name, "pfScaleX")){ PlayerInfo[playerid][pfScaleX] = strval(value); } if (!strcmp(name, "pfScaleY")){ PlayerInfo[playerid][pfScaleY] = strval(value); } if (!strcmp(name, "pfScaleZ")){ PlayerInfo[playerid][pfScaleZ] = strval(value); } INI_Int("pindex",PlayerInfo[playerid][pindex]); INI_Int("pmodelid",PlayerInfo[playerid][pmodelid]); INI_Int("pboneid",PlayerInfo[playerid][pboneid]); INI_Float("pfOffsetX",PlayerInfo[playerid][pfOffsetX]); INI_Float("pfOffsetY",PlayerInfo[playerid][pfOffsetY]); INI_Float("pfOffsetZ",PlayerInfo[playerid][pfOffsetZ]); INI_Float("pfRotX",PlayerInfo[playerid][pfRotX]); INI_Float("pfRotY",PlayerInfo[playerid][pfRotY]); INI_Float("pfRotZ",PlayerInfo[playerid][pfRotZ]); INI_Float("pfScaleX",PlayerInfo[playerid][pfScaleX]); INI_Float("pfScaleY",PlayerInfo[playerid][pfScaleY]); INI_Float("pfScaleZ",PlayerInfo[playerid][pfScaleZ]); return 1; } |