Toy system help (mSelection related)
#1

Hello there.
I recently download a game mode from this forum and in the same way, I've found mSelection include.
Well I started to use this include and I was thinking about adjusting the game mode current toy system to mSelection supported system.
Well basicallyI have not warnings / errors at all, but after buying the toy, and trying to edit the toy slot, its claims that I dont have any toy in this slot.
These are the codes:
Код:
CMD:btoys(playerid, params[])
{
	new index, idx = GetPlayerVirtualWorld(playerid)-100;
	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(idx > 0 && idx < MAX_BIZ && BizInfo[idx][bType] != 2 || idx < 1 || idx > MAX_BIZ) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a Clothes Shop.");
	if(sscanf(params, "i", index))
	{
		SendClientMessage(playerid, COLOR_GREY, "Usage: /buytoys [Slot]");
	    return 1;
	}
	if(BizInfo[idx][bProducts] < 1) return SendClientMessage(playerid, COLOR_GREY, "This business is currently out of products.");
	if(index < 0 || index > 9) return SendClientMessage(playerid, COLOR_GREY, "Slots are between 0 and 9.");
	if(index > 1 && PlayerInfo[playerid][pVIP] < 1) return SendClientMessage(playerid, COLOR_GREY, "You need to have a higher VIP level to use more than 2 slots.");
	if(index > 3 && PlayerInfo[playerid][pVIP] < 2) return SendClientMessage(playerid, COLOR_GREY, "You need to have a higher VIP level to use more than 4 slots.");
	if(index > 5 && PlayerInfo[playerid][pVIP] < 3) return SendClientMessage(playerid, COLOR_GREY, "You need to have a higher VIP level to use more than 6 slots.");
	if(index > 7 && PlayerInfo[playerid][pVIP] < 4) return SendClientMessage(playerid, COLOR_GREY, "You need to have a higher VIP level to use more than 8 slots.");
	if(PlayerInfo[playerid][pMoney] < 300) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to do this.");
	ShowModelSelectionMenu(playerid, toylist, "Select Toy");
	return 1;
}
and..
Код:
    if(listid == toylist)
    {
    	new option, index, model;
        if(response)
        {
	switch(option)
	{
	    case 1 : model = 19006; case 2 : model = 19007; case 3 : model = 19008; case 4 : model = 19009; case 5 : model = 19010; // Glasses
	    case 6 : model = 19011; case 7 : model = 19012; case 8 : model = 19013; case 9 : model = 19014; case 10: model = 19015;
	    case 11: model = 19016; case 12: model = 19017; case 13: model = 19018; case 14: model = 19019; case 15: model = 19020;
	    case 16: model = 19021; case 17: model = 19022; case 18: model = 19023; case 19: model = 19024; case 20: model = 19025;
	    case 21: model = 19026; case 22: model = 19027; case 23: model = 19028; case 24: model = 19029; case 25: model = 19030;
	    case 26: model = 19031; case 27: model = 19032; case 28: model = 19033; case 29: model = 19034; case 30: model = 19035;
	    case 31: model = 19039; case 32: model = 19040; case 33: model = 19041; case 34: model = 19042; case 35: model = 19043; // Watches
	    case 36: model = 19044; case 37: model = 19045; case 38: model = 19046; case 39: model = 19047; case 40: model = 19048;
	    case 41: model = 19049; case 42: model = 19050; case 43: model = 19051; case 44: model = 19052; case 45: model = 19053;
	    case 46: model = 18891; case 47: model = 18892; case 48: model = 18893; case 49: model = 18894; case 50: model = 18895; // Bandanas
	    case 51: model = 18896; case 52: model = 18897; case 53: model = 18898; case 54: model = 18899; case 55: model = 18900;
	    case 56: model = 18901; case 57: model = 18902; case 58: model = 18903; case 59: model = 18904; case 60: model = 18905;
	    case 61: model = 18906; case 62: model = 18907; case 63: model = 18908; case 64: model = 18909; case 65: model = 18910;
	    case 66: model = 18926; case 67: model = 18927; case 68: model = 18928; case 69: model = 18929; case 70: model = 18930; // Hats
	    case 71: model = 18931; case 72: model = 18932; case 73: model = 18933; case 74: model = 18934; case 75: model = 18935;
	    case 76: model = 18911; case 77: model = 18912; case 78: model = 18913; case 79: model = 18914; case 80: model = 18915; // Masks
	    case 81: model = 18916; case 82: model = 18917; case 83: model = 18918; case 84: model = 18919; case 85: model = 18920;
	    case 86 : model = 19142;
	}
	if(PlayerInfo[playerid][pMoney] < 300) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this toy.");
	PlayerInfo[playerid][pToyModel][index] = model;
	GiveDodMoney(playerid, -300);
 	SendClientMessage(playerid, COLOR_WHITE, " You can view and edit your toys using /toys.");
 	}
        else SendClientMessage(playerid, 0xFF0000FF, "Canceled toy selection");
        return 1;
    }
What to do?
I am sure that the "toys.txd" been scripted like it should be.
And everything works, it just wont save the toy.
Please what do to?
Thank you (If you help, of course you will gain my thanks and rep)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)