mSelection - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mSelection (
/showthread.php?tid=541943)
mSelection -
b00m112 - 15.10.2014
So, i want to use mselecton for skin's
Код:
COMMAND:oriided(playerid, params[])
{
new skinid;
if(PlayerLoggedIn[playerid] == true)
{
if(!sscanf(params, "i", skinid))
{
if(skinid >= 1 && skinid <= 299)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,207.8758,-100.6210,1005.2578))
{
if(100 < KasutajaInfo[playerid][Raha])
{
SendClientMessage(playerid, COLOR_GREY, "Sa ostsid uued riided endale.Maksumus 100 SAKi!");
SetPlayerSkin(playerid, skinid);
GiveIGMoney(playerid, -100);
}
else SendClientMessage(playerid, COLOR_WHITE, " Sul ei ole piisavalt raha(100 SAK'i)");
}
else SendClientMessage(playerid, COLOR_WHITE, " Sa ei ole riidepoes");
}
else SendClientMessage(playerid, COLOR_WHITE, " Skin ei saa olla alla 1 ja suurem kui 299");
}
else SendClientMessage(playerid, COLOR_WHITE, "KASUTUS: /oriided [Skinid]");
}
else SendClientMessage(playerid, COLOR_WHITE, "VIGA: Sa ei ole veel sisse loginud");
return 1;
}
What i have to do? to make the skinlist mselection?
I really hope you understand me
Re: mSelection -
Sawalha - 15.10.2014
Up:
pawn Код:
new skins = mS_INVALID_LISTID;
2. Make a text file called "skins". Insert into it these information:
Код:
ModelID RotX RotY RotZ Zoom
They are TextDraw font 5 settings, Learn more at:
https://sampwiki.blast.hk/wiki/TextDrawSetPreviewModel
After all this, Load your skins file:
pawn Код:
public OnGameModeInit()
{
skins = LoadModelSelectionMenu("skins.txt");
return 1;
}
Then , make a cmd o/r anything to show it to the player:
pawn Код:
CMD:test(playerid, params[])
{
#pragma unused params
ShowModelSelectionMenu(playerid, skins, "Select Skin");
return 1;
}
Use this public function to response the player menu call (when he clicks at a model):
pawn Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
Re: mSelection -
b00m112 - 15.10.2014
Yes, but if i want to use mselecton at this command (oriided) then what i have to change there?