Szia!
A mentést nem tudom megcsinálni de a többi megvan #include <a_samp>
#include zcmd
new skill[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Fegyver skill\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
main()
{
print(\"\\n----------------------------------\");
print(\" Fegyver SKill\");
print(\"----------------------------------\\n\");
}
CMD:skill(playerid){
ShowPlayerDialog(playerid,999,DIALOG_STYLE_LIST,\"Fegyver skill\",\"1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\\n10\",\"Választ\",\"Kilép\");
return 1;}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 999)
{
if(response)
{
switch (listitem)
{
case 0:{
if(GetPlayerMoney(playerid) < 2000)return SendClientMessage(playerid,0xeb1a1aAA, \"nincs elég pénzed\");
if(skill[playerid] != 0)return SendClientMessage(playerid,0xeb1a1aAA, \"Már megvetted az 1-es skillt\");
skill[playerid]=1;
GivePlayerMoney(playerid,-2000);
SendClientMessage(playerid,0x127bebAA,\"1-es skill megvéve minden fegyverre\");
SetPlayerSkillLevel(playerid, 1, 1);
SetPlayerSkillLevel(playerid, 2, 1);
SetPlayerSkillLevel(playerid, 3, 1);
SetPlayerSkillLevel(playerid, 4, 1);
SetPlayerSkillLevel(playerid, 5, 1);
SetPlayerSkillLevel(playerid, 6, 1);
SetPlayerSkillLevel(playerid, 7, 1);
SetPlayerSkillLevel(playerid, 8, 1);
SetPlayerSkillLevel(playerid, 9, 1);
SetPlayerSkillLevel(playerid, 10, 1);
}
case 1:
{
if(GetPlayerMoney(playerid) < 2000)return SendClientMessage(playerid,0xeb1a1aAA, \"nincs elég pénzed\");
if(skill[playerid] != 1)return SendClientMessage(playerid,0xeb1a1aAA, \"Elõször vedd meg az egyes skill-t\");
GivePlayerMoney(playerid,-2000);
skill[playerid]=2;
SendClientMessage(playerid,0x127bebAA,\"2-es skill megvéve minden fegyverre\");
SetPlayerSkillLevel(playerid, 1, 2);
SetPlayerSkillLevel(playerid, 2, 2);
SetPlayerSkillLevel(playerid, 3, 2);
SetPlayerSkillLevel(playerid, 4, 2);
SetPlayerSkillLevel(playerid, 5, 2);
SetPlayerSkillLevel(playerid, 6, 2);
SetPlayerSkillLevel(playerid, 7, 2);
SetPlayerSkillLevel(playerid, 8, 2);
SetPlayerSkillLevel(playerid, 9, 2);
SetPlayerSkillLevel(playerid, 10, 2);
}
case 2:{
if(GetPlayerMoney(playerid) < 2000)return SendClientMessage(playerid,0xeb1a1aAA, \"nincs elég pénzed\");
if(skill[playerid] != 2)return SendClientMessage(playerid,0xeb1a1aAA, \"Elõször vedd meg az kettes skill-t\");
GivePlayerMoney(playerid,-2000);
skill[playerid]=3;
SendClientMessage(playerid,0x127bebAA,\"3-as skill megvéve minden fegyverre\");
SetPlayerSkillLevel(playerid, 1, 3);
SetPlayerSkillLevel(playerid, 2, 3);
SetPlayerSkillLevel(playerid, 3, 3);
SetPlayerSkillLevel(playerid, 4, 3);
SetPlayerSkillLevel(playerid, 5, 3);
SetPlayerSkillLevel(playerid, 6, 3);
SetPlayerSkillLevel(playerid, 7, 3);
SetPlayerSkillLevel(playerid, 8, 3);
SetPlayerSkillLevel(playerid, 9, 3);
SetPlayerSkillLevel(playerid, 10, 3);
}
case 3:{
if(GetPlayerMoney(playerid) < 2000)return SendClientMessage(playerid,0xeb1a1aAA, \"nincs elég pénzed\");
if(skill[playerid] != 3)return SendClientMessage(playerid,0xeb1a1aAA, \"Elõször vedd meg az hármas skill-t\");
GivePlayerMoney(playerid,-2000);
skill[playerid]=4;
SendClientMessage(playerid,0x127bebAA,\"4-es skill megvéve minden fegyverre\");
SetPlayerSkillLevel(playerid, 1, 4);
SetPlayerSkillLevel(playerid, 2, 4);
SetPlayerSkillLevel(playerid, 3, 4);
SetPlayerSkillLevel(playerid, 4, 4);
SetPlayerSkillLevel(playerid, 5, 4);
SetPlayerSkillLevel(playerid, 6, 4);
SetPlayerSkillLevel(playerid, 7, 4);
SetPlayerSkillLevel(playerid, 8, 4);
SetPlayerSkillLevel(playerid, 9, 4);
SetPlayerSkillLevel(playerid, 10, 4);
}
case 4:{
if(GetPlayerMoney(playerid) < 2000)return SendClientMessage(playerid,0xeb1a1aAA, \"nincs elég pénzed\");
if(skill[playerid] != 4)return SendClientMessage(playerid,0xeb1a1aAA, \"Elõször vedd meg a négyes skill-t\");
GivePlayerMoney(playerid,-2000);
skill[playerid]=5;
SendClientMessage(playerid,0x127bebAA,\"5-ös skill megvéve minden fegyverre\");
SetPlayerSkillLevel(playerid, 1, 5);
SetPlayerSkillLevel(playerid, 2, 5);
SetPlayerSkillLevel(playerid, 3, 5);
SetPlayerSkillLevel(playerid, 4, 5);
SetPlayerSkillLevel(playerid, 5, 5);
SetPlayerSkillLevel(playerid, 6, 5);
SetPlayerSkillLevel(playerid, 7, 5);
SetPlayerSkillLevel(playerid, 8, 5);
SetPlayerSkillLevel(playerid, 9, 5);
SetPlayerSkillLevel(playerid, 10, 5);
}
case 5:{
if(GetPlayerMoney(playerid) < 2000)return SendClientMessage(playerid,0xeb1a1aAA, \"nincs elég pénzed\");
if(skill[playerid] != 5)return SendClientMessage(playerid,0xeb1a1aAA, \"Elõször vedd meg az ötös skill-t\");
GivePlayerMoney(playerid,-2000);
skill[playerid]=6;
SendClientMessage(playerid,0x127bebAA,\"6-os skill megvéve minden fegyverre\");
SetPlayerSkillLevel(playerid, 1, 6);
SetPlayerSkillLevel(playerid, 2, 6);
SetPlayerSkillLevel(playerid, 3, 6);
SetPlayerSkillLevel(playerid, 4, 6);
SetPlayerSkillLevel(playerid, 5, 6);
SetPlayerSkillLevel(playerid, 6, 6);
SetPlayerSkillLevel(playerid, 7, 6);
SetPlayerSkillLevel(playerid, 8, 6);
SetPlayerSkillLevel(playerid, 9, 6);
SetPlayerSkillLevel(playerid, 10, 6);
}
case 6:{
if(GetPlayerMoney(playerid) < 2000)return SendClientMessage(playerid,0xeb1a1aAA, \"nincs elég pénzed\");
if(skill[playerid] != 6)return SendClientMessage(playerid,0xeb1a1aAA, \"Elõször vedd meg a hatos skill-t\");
GivePlayerMoney(playerid,-2000);
skill[playerid]=7;
SendClientMessage(playerid,0x127bebAA,\"7-es skill megvéve minden fegyverre\");
SetPlayerSkillLevel(playerid, 1, 7);
SetPlayerSkillLevel(playerid, 2, 7);
SetPlayerSkillLevel(playerid, 3, 7);
SetPlayerSkillLevel(playerid, 4, 7);
SetPlayerSkillLevel(playerid, 5, 7);
SetPlayerSkillLevel(playerid, 6, 7);
SetPlayerSkillLevel(playerid, 7, 7);
SetPlayerSkillLevel(playerid, 8, 7);
SetPlayerSkillLevel(playerid, 9, 7);
SetPlayerSkillLevel(playerid, 10, 7);
}
case 7:{
if(GetPlayerMoney(playerid) < 2000)return SendClientMessage(playerid,0xeb1a1aAA, \"nincs elég pénzed\");
if(skill[playerid] != 7)return SendClientMessage(playerid,0xeb1a1aAA, \"Elõször vedd meg a hetes skill-t\");
GivePlayerMoney(playerid,-2000);
skill[playerid]=8;
SendClientMessage(playerid,0x127bebAA,\"8-as skill megvéve minden fegyverre\");
SetPlayerSkillLevel(playerid, 1, ;
SetPlayerSkillLevel(playerid, 2, ;
SetPlayerSkillLevel(playerid, 3, ;
SetPlayerSkillLevel(playerid, 4, ;
SetPlayerSkillLevel(playerid, 5, ;
SetPlayerSkillLevel(playerid, 6, ;
SetPlayerSkillLevel(playerid, 7, ;
SetPlayerSkillLevel(playerid, 8, ;
SetPlayerSkillLevel(playerid, 9, ;
SetPlayerSkillLevel(playerid, 10, ;
}
case 8:{
if(GetPlayerMoney(playerid) < 2000)return SendClientMessage(playerid,0xeb1a1aAA, \"nincs elég pénzed\");
if(skill[playerid] != 8)return SendClientMessage(playerid,0xeb1a1aAA, \"Elõször vedd meg a nyolcas skill-t\");
GivePlayerMoney(playerid,-2000);
skill[playerid]=9;
SendClientMessage(playerid,0x127bebAA,\"9-es skill megvéve minden fegyverre\");
SetPlayerSkillLevel(playerid, 1, 9);
SetPlayerSkillLevel(playerid, 2, 9);
SetPlayerSkillLevel(playerid, 3, 9);
SetPlayerSkillLevel(playerid, 4, 9);
SetPlayerSkillLevel(playerid, 5, 9);
SetPlayerSkillLevel(playerid, 6, 9);
SetPlayerSkillLevel(playerid, 7, 9);
SetPlayerSkillLevel(playerid, 8, 9);
SetPlayerSkillLevel(playerid, 9, 9);
SetPlayerSkillLevel(playerid, 10, 9);
}
case 9:{
if(GetPlayerMoney(playerid) < 2000)return SendClientMessage(playerid,0xeb1a1aAA, \"nincs elég pénzed\");
if(skill[playerid] != 9)return SendClientMessage(playerid,0xeb1a1aAA, \"Elõször vedd meg az kilences skill-t\");
GivePlayerMoney(playerid,-2000);
skill[playerid]=10;
SendClientMessage(playerid,0x127bebAA,\"10-es skill megvéve minden fegyverre\");
SetPlayerSkillLevel(playerid, 1, 10);
SetPlayerSkillLevel(playerid, 2, 10);
SetPlayerSkillLevel(playerid, 3, 10);
SetPlayerSkillLevel(playerid, 4, 10);
SetPlayerSkillLevel(playerid, 5, 10);
SetPlayerSkillLevel(playerid, 6, 10);
SetPlayerSkillLevel(playerid, 7, 10);
SetPlayerSkillLevel(playerid, 8, 10);
SetPlayerSkillLevel(playerid, 9, 10);
SetPlayerSkillLevel(playerid, 10, 10);
}
}
}
}
return 1;
}
Teszteltem, mûködik