Hy, gondoltam írok egy skin mentõ és betõltõ szkriptet parancsai: /sajatskin , /skinbetolt
Hozzatok létre a scriptfiles mappában egy jatekos TXT!
A saját skin mentésért írd be /sajatskin
Készitõ: Exec$
#include <a_samp>
#include < Zcmd >
#include < Dini >
#define Skin 23
#define G \"{6EF83C}\"
#define R \"{F81414}\"
#define W \"{FFFFFF}\"
#define O \"{FFAF00}\"
#define L \"{00C0FF}\"
#define V \"{B700FF}\"
public OnFilterScriptInit()
{
if(!fexist(\"/jatekos.ini\")) dini_Create(\"/jatekos/skin.ini\");
}
public OnPlayerSpawn(playerid)
{
new P_Msg[124];
if(dini_Isset(\"/jatekos/skin.ini\",P_Name(playerid))) SetPlayerSkin(playerid, dini_Int(\"/jatekos/skin.ini\",P_Name(playerid)));
format(P_Msg, sizeof(P_Msg), \"\"W\"Autómatikusan lementõdõtt a skined: \"G\"%d\",GetPlayerSkin(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, P_Msg);
return true;
}
CMD:skinbetolt(playerid, params[ ] )
{
new P_Msg[124];
if(dini_Isset(\"/jatekos/skin.ini\",P_Name(playerid))) SetPlayerSkin(playerid, dini_Int(\"/jatekos/skin.ini\",P_Name(playerid)));
format(P_Msg, sizeof(P_Msg), \"\"W\"A mostani skined \"G\"%d.\", GetPlayerSkin(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, P_Msg);
return true;
}
CMD:sajatskin(playerid, params[ ] )
{
ShowPlayerDialog(playerid, Skin, DIALOG_STYLE_INPUT, \"\"R\"Válazd ki a skined\", \"\"G\"Tölsd be a skined\", \">> OK <<\", \"Cancel\");
return true;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Skin)
{
if(response)
{
new S_id,
P_Msg[124];
S_id = strval(inputtext);
if(S_id < 0 || S_id > 300)
{
SendClientMessage(playerid, 0xFFFFFFFF, \"\"R\"Írjál egy skin ID \"G\"1 -tõl \"R\"egészen \"G\"299\");
}
else
{
SetPlayerSkin(playerid, S_id);
format(P_Msg, sizeof(P_Msg), \"\"W\"A skined ell lett mentve \"G\"%d\",S_id);
SendClientMessage(playerid, 0xFFFFFFFF, P_Msg);
dini_IntSet(\"/jatekos/skin.ini\",P_Name(playerid),GetPlayerSkin(playerid));
}
}
}
return true;
}
stock P_Name(playerid)
{
new PN[MAX_PLAYERS];
GetPlayerName(playerid, PN, sizeof(PN));
return PN;
}