HELP PLEASE
#1

How To Make My Attchments IN GAMEMODE SAVE ? HELP



CMDukapanel(playerid,params[])
{

new string14[128];
new dialog[500];
if(PlayerInfo[playerid][vip] < 1) return SendClientMessage(playerid, -1,"You must be VIP to use sukapanel");
for(new x;x<MAX_OSLOTS;x++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, x))
{ format(string14, sizeof(string14), ""COL_WHITE"Slot:%d :: "COL_GREEN"Used Slot\n", x); }
else format(string14, sizeof(string14), ""COL_WHITE"Slot:%d\n", x);
strcat(dialog,string14);
}
ShowPlayerDialog(playerid, DIALOG_ATTACH_INDEX_SELECTION, DIALOG_STYLE_LIST,"Player Objects/Attachment: (Select Slot)", dialog, "Select", "Close(X)");
return 1;
}
Reply
#2

get its position, get player's name, save it to file with his name. you can use y_ini.
when player connects, check if player's file exist, if yes, load the positions, create objects, attach them.

learn some basics first. don't go rough. this system doesn't belong to basic stuff, and it's obviously not yours - if it was yours, you would know how to save these objects.
Reply
#3

new file[256];
new name[24];
new f1[15],f2[15],f3[15],f4[15],f5[15],f6[15],f7[15],f8[15],f9[15],f10[15],f11[15];
GetPlayerName(playerid,name,24);
format(file,sizeof(file),"Player Objects/%s.ini",name);
if(!dini_Exists(file))
{
dini_Create(file);
for(new x;x<MAX_OSLOTS;x++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, x))
{
format(f1,15,"O_Model_%d",x);
format(f2,15,"O_Bone_%d",x);
format(f3,15,"O_OffX_%d",x);
format(f4,15,"O_OffY_%d",x);
format(f5,15,"O_OffZ_%d",x);
format(f6,15,"O_RotX_%d",x);
format(f7,15,"O_RotY_%d",x);
format(f8,15,"O_RotZ_%d",x);
format(f9,15,"O_ScaleX_%d",x);
format(f10,15,"O_ScaleY_%d",x);
format(f11,15,"O_ScaleZ_%d",x);
dini_IntSet(file,f1,0);
dini_IntSet(file,f2,0);
dini_FloatSet(file,f3,0.0);
dini_FloatSet(file,f4,0.0);
dini_FloatSet(file,f5,0.0);
dini_FloatSet(file,f6,0.0);
dini_FloatSet(file,f7,0.0);
dini_FloatSet(file,f8,0.0);
dini_FloatSet(file,f9,0.0);
dini_FloatSet(file,f10,0.0);
dini_FloatSet(file,f11,0.0);
}
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)