[Include] [0.3X] mSelection 1.1 R3 - Create Model Preview Menus with a few lines of code
#61

go to sa-mp.com/download and download the 0.3x server files and update your server, and make sure you also compile the GM and other scripts with the new .inc files from the pawno/includes folder.
Reply
#62

Quote:
Originally Posted by absolute
View Post
tried to make it for weapons but its showing the skins in the menu
how to fix that? please help
Code:
//at the top

new weaplist = mS_INVALID_LISTID;

//OnGameModeInIt

weaplist = LoadModelSelectionMenu("weap.txt");

//command

	CMD:w(playerid, params[])
	{
	    ShowModelSelectionMenu(playerid, weaplist, "Select Weapon");
	    return 1;
	}

//OnPlayerModelSelection

	if(listid == weaplist)
	{
     if(response)
	    {
         	GivePlayerWeapon(playerid, modelid, 99999);
		}
		else
		{
		    return 0;
		}
	}
Here is the answer:

Quote:
Originally Posted by D0erfler
View Post
https://sampwiki.blast.hk/wiki/Weapons
have a look at the "object id" column
mSelection uses the ObjectID and GivePlayerWeapon the WeaponID

Edit: have a look at this topic if you don't get any weapons: https://sampforum.blast.hk/showthread.php?tid=418951
Reply
#63

I have a problem that I can't click on Skin Cancel Prev and Next on the menu dialog.

Code:
public OnPlayerModelSelection(playerid, response, listid, modelid) 
{ 
    if(listid == skinlist) 
    { 
        if(response) 
        { 
            if(IsValidSkin(modelid) == 0) 
            { 
                 if(GetPVarInt(playerid, "freeSkin") == 1) 
                { 
                    SendClientMessageEx(playerid, COLOR_GREY, "That skin ID is either invalid or restricted to faction or family!"); 
                    ShowModelSelectionMenu(playerid, skinlist, "Select Skin"); 
                } 
                else 
                { 
                    SendClientMessageEx(playerid, COLOR_GREY, "That skin ID is either invalid or restricted to faction or family!"); 
                    ShowModelSelectionMenu(playerid, skinlist, "Select Skin"); 
                } 
            } 
            else 
            { 
                if(GetPVarInt(playerid, "freeSkin") == 1) 
                { 
                    PlayerInfo[playerid][pModel] = modelid; 
                    SetPlayerSkin(playerid, modelid); 
                    SetPVarInt(playerid, "freeSkin", 0); 
                } 
                else 
                { 
                    if(GetPlayerCash(playerid) < 2500) return SendClientMessageEx(playerid, COLOR_GRAD2, "You can't afford these clothes!"); 
                    GameTextForPlayer(playerid, "~g~Skin purchased! ~n~ ~r~- $2500", 2000, 1); 
                    GivePlayerCash(playerid, -2500); 
                    PlayerInfo[playerid][pModel] = modelid; 
                    SetPlayerSkin(playerid, modelid); 
                } 
            } 
        } 
    } 
    return 1; 
}
Code:
CMD:buyclothes(playerid, params[]) 
{ 
    if(IsAtClothShop(playerid)) 
    { 
        ShowModelSelectionMenu(playerid, skinlist, "Skin cost: 2500$"); 
    } 
    else 
    { 
        SendClientMessageEx( playerid, COLOR_WHITE, "   You are not in a Clothing Shop!" ); 
    } 
    return 1; 
}
Reply
#64

Quote:
Originally Posted by Kenway
View Post
I have a problem that I can't click on Skin Cancel Prev and Next on the menu dialog.
Make sure there are no other filterscript loaded which return 1 in "OnPlayerSelectTextDraw".

OnPlayerSelectTextDraw + "return 1;" in a filterscript will stop "OnPlayerSelectTextDraw" from being called in other filterscripts and the gamemode, that's the reason why they are called filterscripts
Reply
#65

This include is great but i have a question for you. їHow can i increase the number of the items i can use per ModelSelectionMenu?
Reply
#66

Quote:
Originally Posted by D0erfler
View Post
Make sure there are no other filterscript loaded which return 1 in "OnPlayerSelectTextDraw".

OnPlayerSelectTextDraw + "return 1;" in a filterscript will stop "OnPlayerSelectTextDraw" from being called in other filterscripts and the gamemode, that's the reason why they are called filterscripts
I even dont have
OnPlayerSelectTextDraw
Reply
#67

Quote:
Originally Posted by Kenway
View Post
I even dont have
OnPlayerSelectTextDraw
OnPlayerClickTextDraw*
Reply
#68

Good work =)
Reply
#69

A good thing. Thank you.
I have a question. On how much is being loaded server?
Sorry for my bad English
Reply
#70

Skin selector crashes my GTA
Reply
#71

Some people on my server are complaining that they can only see the first row of items. I can see everything.
Anyone else having the same problem?
Reply
#72

Now... mSelection also in Spanish..

obviously, I have respected the credits.
Reply
#73

Code:
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(192) : error 017: undefined symbol "TEXT_DRAW_FONT_MODEL_PREVIEW"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(196) : error 017: undefined symbol "PlayerTextDrawSetPreviewModel"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(197) : error 017: undefined symbol "PlayerTextDrawSetPreviewRot"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "mZoom"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Zrot"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Yrot"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Xrot"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "modelindex"
Reply
#74

i got a problem , How can i fix it ?

PHP Code:
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(192) : error 017undefined symbol "TEXT_DRAW_FONT_MODEL_PREVIEW"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(196) : error 017undefined symbol "PlayerTextDrawSetPreviewModel"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(197) : error 017undefined symbol "PlayerTextDrawSetPreviewRot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203symbol is never used"mZoom"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203symbol is never used"Zrot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203symbol is never used"Yrot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203symbol is never used"Xrot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203symbol is never used"modelindex"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
3 Errors

Reply
#75

Quote:
Originally Posted by Fredrick
View Post
Code:
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(192) : error 017: undefined symbol "TEXT_DRAW_FONT_MODEL_PREVIEW"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(196) : error 017: undefined symbol "PlayerTextDrawSetPreviewModel"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(197) : error 017: undefined symbol "PlayerTextDrawSetPreviewRot"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "mZoom"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Zrot"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Yrot"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Xrot"
C:\Users\Brandon\Desktop\IGRP2\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "modelindex"
Quote:
Originally Posted by nor15
View Post
i got a problem , How can i fix it ?

PHP Code:
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(192) : error 017undefined symbol "TEXT_DRAW_FONT_MODEL_PREVIEW"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(196) : error 017undefined symbol "PlayerTextDrawSetPreviewModel"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(197) : error 017undefined symbol "PlayerTextDrawSetPreviewRot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203symbol is never used"mZoom"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203symbol is never used"Zrot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203symbol is never used"Yrot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203symbol is never used"Xrot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203symbol is never used"modelindex"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
3 Errors

Update to 0.3x...
Reply
#76

already got 0.3x
Reply
#77

Then your include files aren't -> Click me
Reply
#78

Thanks , Repped
Reply
#79

Damn thank you!
Reply
#80

Quote:
Originally Posted by pasha97
Посмотреть сообщение
omg, i even can't express all my feelings!! This is awesome dude! THank you a lot!
Lol, this is what you used in your server! (UCW) Ive been searching for it every since i saw it in your server... BTW, LOVE THIS INCLUDE! (And pashas server, ULTRA CUBIC WORLD!)
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)