05.02.2013, 17:16
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.
|
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;
}
}
|
|
https://sampwiki.blast.hk/wiki/Weapons
have a look at the "object id" column |
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;
}
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;
}
|
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 |
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"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(192) : error 017: undefined symbol "TEXT_DRAW_FONT_MODEL_PREVIEW"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(196) : error 017: undefined symbol "PlayerTextDrawSetPreviewModel"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(197) : error 017: undefined symbol "PlayerTextDrawSetPreviewRot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "mZoom"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Zrot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Yrot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Xrot"
F:\SFCRRPGv1.1\Los Santos TDM\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "modelindex"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
|
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" |
|
i got a problem , How can i fix it ?
PHP Code:
|