SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 30/09/2017, 05:53 PM   #1
BrainDamaged
Big Clucker
 
BrainDamaged's Avatar
 
Join Date: Jun 2016
Posts: 142
Reputation: 1
Default Toys System Nothing İngame Load Problem

Mode: California Cops And Robbers
Problem: Toys System İngame Nothing Load.
Toys Save .sql Screenshot:

Please Help Me.
Note: My bad english,Sorry.Thanks in advance.
BrainDamaged is offline   Reply With Quote
Old 30/09/2017, 06:10 PM   #2
BrainDamaged
Big Clucker
 
BrainDamaged's Avatar
 
Join Date: Jun 2016
Posts: 142
Reputation: 1
Default Re: Toys System Nothing İngame Load Problem

Please Help
BrainDamaged is offline   Reply With Quote
Old 30/09/2017, 06:19 PM   #3
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,004
Reputation: 824
Default Re: Toys System Nothing İngame Load Problem

Part of the code that suppose to work, logs or what filterscript/include did you get that code from.
http://forum.sa-mp.com/showthread.php?t=574725

You won't have answers because we don't know what you have there at all.
We're not mind readers.
Kaperstone is offline   Reply With Quote
Old 30/09/2017, 06:20 PM   #4
whadez
Big Clucker
 
whadez's Avatar
 
Join Date: Jun 2014
Location: Hungary
Posts: 119
Reputation: 21
Default Re: Toys System Nothing İngame Load Problem

Uh, show us the code dear friend.
__________________
Reference:
(Laravel, Vue.js, NuxtJS SSR, JWT) LS:RP - Hungary [Click Here]
(Laravel, Vue.js) RC:RP [Click Here]
(Laravel, Vue.js) LS:RP MTA [Click Here]
(Laravel) LimeGaming MTA [Click Here]
(Laravel) Blue Lake Roleplay [Click Here]

I'm willing to take webdevelopment jobs. Contact me for info.
Discord: whadez#4817
whadez is offline   Reply With Quote
Old 30/09/2017, 06:22 PM   #5
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,133
Reputation: 445
Default Re: Toys System Nothing İngame Load Problem

First of all, I'm not going the extra mile of finding the gamemode you're mentioning and finding the code myself. You should show it here. Also check for a "mysql_log.log" (I think), and post its contents here if any.

Secondly, give toys their own table, it's way more effective that way. Don't squeeze it in with other player data.
Abagail is offline   Reply With Quote
Old 30/09/2017, 07:02 PM   #6
BrainDamaged
Big Clucker
 
BrainDamaged's Avatar
 
Join Date: Jun 2016
Posts: 142
Reputation: 1
Default Re: Toys System Nothing İngame Load Problem

Quote:
Originally Posted by Kaperstone View Post
Part of the code that suppose to work, logs or what filterscript/include did you get that code from.
http://forum.sa-mp.com/showthread.php?t=574725

You won't have answers because we don't know what you have there at all.
We're not mind readers.
Quote:
Originally Posted by whadez View Post
Uh, show us the code dear friend.
Quote:
Originally Posted by Abagail View Post
First of all, I'm not going the extra mile of finding the gamemode you're mentioning and finding the code myself. You should show it here. Also check for a "mysql_log.log" (I think), and post its contents here if any.

Secondly, give toys their own table, it's way more effective that way. Don't squeeze it in with other player data.

Thanks,sorry for the mistakes in the matter
mysql_log; Logging started at 10:51, 08.07.2017 / Result: NP
Gamemode: California Cops And Robbers
Toys.inc:
Code:
#define DIALOG_ATTACH_INDEX             13500
#define DIALOG_ATTACH_INDEX_SELECTION   DIALOG_ATTACH_INDEX+1
#define DIALOG_ATTACH_EDITREPLACE       DIALOG_ATTACH_INDEX+2
#define DIALOG_ATTACH_MODEL_SELECTION   DIALOG_ATTACH_INDEX+3
#define DIALOG_ATTACH_BONE_SELECTION    DIALOG_ATTACH_INDEX+4
#define DIALOG_ATTACH_OBJECT_SELECTION  DIALOG_ATTACH_INDEX+5
#define DIALOG_ATTACH_OBJECT2_SELECTION DIALOG_ATTACH_INDEX+6
new AttachmentObjectsList[] = {
18632,
18633,
18634,
18635,
18636,
18637,
18638,
18639,
18640,
18975,
19136,
19274,
18641,
18642,
18643,
18644,
18645,
18865,
18866,
18867,
18868,
18869,
18870,
18871,
18872,
18873,
18874,
18875,
18890,
18891,
18892,
18893,
18894,
18895,
18896,
18897,
18898,
18899,
18900,
18901,
18902,
18903,
18904,
18905,
18906,
18907,
18908,
18909,
18910,
18911,
18912,
18913,
18914,
18915,
18916,
18917,
18918,
18919,
18920,
18921,
18922,
18923,
18924,
18925,
18926,
18927,
18928,
18929,
18930,
18931,
18932,
18933,
18934,
18935,
18936,
18937,
18938,
18939,
18940,
18941,
18942,
18943,
18944,
18945,
18946,
18947,
18948,
18949,
18950,
18951,
18952,
18953,
18954,
18955,
18956,
18957,
18958,
18959,
18960,
18961,
18962,
18963,
18964,
18965,
18966,
18967,
18968,
18969,
18970,
18971,
18972,
18973,
18974,
18976,
18977,
18978,
18979,
19006,
19007,
19008,
19009,
19010,
19011,
19012,
19013,
19014,
19015,
19016,
19017,
19018,
19019,
19020,
19021,
19022,
19023,
19024,
19025,
19026,
19027,
19028,
19029,
19030,
19031,
19032,
19033,
19034,
19035,
19036,
19037,
19038,
19039,
19040,
19041,
19042,
19043,
19044,
19045,
19046,
19047,
19048,
19049,
19050,
19051,
19052,
19053,
19085,
19086,
19090,
19091,
19092,
19093,
19094,
19095,
19096,
19097,
19098,
19099,
19100,
19101,
19102,
19103,
19104,
19105,
19106,
19107,
19108,
19109,
19110,
19111,
19112,
19113,
19114,
19115,
19116,
19117,
19118,
19119,
19120,
19137,
19138,
19139,
19140,
19141,
19142,
19160,
19161,
19162,
19163,
19317,
19318,
19319,
19330,
19331,
19346,
19347,
19348,
19349,
19350,
19351,
19352,
19487,
19488,
19513,
19515,
331,
333,
334,
335,
336,
337,
338,
339,
341,
321,
322,
323,
324,
325,
326,
343,
346,
347,
348,
349,
350,
351,
352,
353,
355,
356,
372,
357,
358,
361,
363,
364,
365,
366,
367,
368,
369,
371
};
//==============================================================================
new AttachmentBones[][24] = {
{"Spine"},
{"Head"},
{"Left upper arm"},
{"Right upper arm"},
{"Left hand"},
{"Right hand"},
{"Left thigh"},
{"Right thigh"},
{"Left foot"},
{"Right foot"},
{"Right calf"},
{"Left calf"},
{"Left forearm"},
{"Right forearm"},
{"Left clavicle"},
{"Right clavicle"},
{"Neck"},
{"Jaw"}
};

CMD:toys(playerid,params[])
{
	if(Player[playerid][vipLevel] == 3)
	{
		new string[128];
		new dialog[500];
		for(new x; x < MAX_OSLOTS; x++)
		{
			if(IsPlayerAttachedObjectSlotUsed(playerid, x))
			{	format(string, sizeof(string), CHAT_WHITE"Slot %d : "	CHAT_RED"(Used Slot)\n", x);    }
			else format(string, sizeof(string), CHAT_WHITE"Slot %d\n", x);
			strcat(dialog,string);
		}
		ShowPlayerDialog(playerid, DIALOG_ATTACH_INDEX_SELECTION, DIALOG_STYLE_LIST,"Toy System - "CHAT_YELLOW"Select Slot", dialog, "Choose", "Close");
	}
	return 1;
}

public OnPlayerModelSelectionEx(playerid, response, extraid, modelid)
{
	if(extraid==DIALOG_ATTACH_MODEL_SELECTION)
	{
	    if(!response)
     	{
			ShowPlayerDialog(playerid, DIALOG_ATTACH_OBJECT_SELECTION, DIALOG_STYLE_LIST,"Toy System - "CHAT_YELLOW"Select Object", "Server Objects Menu\nCustom Object", "Next", "Back");
		}
	    else
	    {
		    if(GetPVarInt(playerid, "AttachmentUsed") == 1) EditAttachedObject(playerid, modelid);
		    else
		    {
			    SetPVarInt(playerid, "AttachmentModelSel", modelid);
                new string[256+1];
				new dialog[500];
				for(new x;x<sizeof(AttachmentBones);x++)
    			{
					format(string, sizeof(string), "Bone %s\n", AttachmentBones[x]);
					strcat(dialog,string);
				}
				ShowPlayerDialog(playerid, DIALOG_ATTACH_BONE_SELECTION, DIALOG_STYLE_LIST, \
				"Toy System - "CHAT_YELLOW"Bone Selection", dialog, "Select", "Cancel");
		    }//else DeletePVar(playerid, "AttachmentIndexSel");
		}
 	}
	return 1;
}

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)
{
	Player[playerid][toyStatus][index] = true;
	Player[playerid][toyID][index] = modelid;
	Player[playerid][toyBone][index] = boneid;
	Player[playerid][toyPosX][index] = fOffsetX;
	Player[playerid][toyPosY][index] = fOffsetY;
	Player[playerid][toyPosZ][index] = fOffsetZ;
	Player[playerid][toyRotX][index] = fRotX;
	Player[playerid][toyRotY][index] = fRotY;
	Player[playerid][toyRotZ][index] = fRotZ;
	Player[playerid][toyScaleX][index] = fScaleX;
	Player[playerid][toyScaleY][index] = fScaleY;
	Player[playerid][toyScaleZ][index] = fScaleZ;
    SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
    Info(playerid, "You have finished editing attachments, type /savestats to save it.");
    return 1;
}
Onplayerspawn public;
Code:
Player[playerid][onFallout] = false;
	for(new x = 0; x < MAX_OSLOTS; x++)
	{
		if(Player[playerid][toyStatus][x])
		{
			if(!IsPlayerAttachedObjectSlotUsed(playerid, x))
			{
				SetPlayerAttachedObject(playerid, x, Player[playerid][toyID][x], Player[playerid][toyBone][x], Player[playerid][toyPosX][x], Player[playerid][toyPosY][x], Player[playerid][toyPosZ][x], Player[playerid][toyRotX][x], Player[playerid][toyRotY][x], Player[playerid][toyRotZ][x], Player[playerid][toyScaleX][x], Player[playerid][toyScaleY][x], Player[playerid][toyScaleZ][x]);
			}
		}
	}
	removePlayerRoadblocks(playerid);
	if(Player[playerid][usingAnim])
	{
BrainDamaged is offline   Reply With Quote
Old 30/09/2017, 07:07 PM   #7
jlalt
Banned
 
Join Date: Oct 2014
Location: Iran
Posts: 1,266
Reputation: 366
Default Re: Toys System Nothing İngame Load Problem

Show player toy1-... Load codes kindly.
I think I had same problem with same gm before, and if I am not wrong it was because split char wasn't specified correctly for sscanf.

Edit:
By simple mean show us player toys load codes...
jlalt is offline   Reply With Quote
Old 30/09/2017, 07:25 PM   #8
BrainDamaged
Big Clucker
 
BrainDamaged's Avatar
 
Join Date: Jun 2016
Posts: 142
Reputation: 1
Default Re: Toys System Nothing İngame Load Problem

Quote:
Originally Posted by jlalt View Post
Show player toy1-... Load codes kindly.
I think I had same problem with same gm before, and if I am not wrong it was because split char wasn't specified correctly for sscanf.
Sorry,my bad english,I could not understand what,exactly what should i do,I do not have a vast knowledge of this subject,Can you edit it?,I would be very happy.
Note: I used ****** trantate sorry.
BrainDamaged is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
load/save toys Mysql Unrea1 Scripting Help 0 08/02/2016 03:37 PM
Problem with business load system andrejc999 Scripting Help 8 23/06/2015 07:35 PM
House System problem with load ilepopivanov Scripting Help 3 28/02/2015 10:55 AM
Load Toys from database [HELP!] [REP] cuemur Scripting Help 0 13/03/2014 02:57 PM
0.3e Toys system kevann Server Support 3 28/08/2012 08:42 PM


All times are GMT. The time now is 11:31 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.