SA-MP Forums Archive
[FilterScript] Fighting Styles [+ preservation] - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Fighting Styles [+ preservation] (/showthread.php?tid=388691)



Fighting Styles [+ preservation] - Lion Creighton - 30.10.2012

Hello
Strange, but nowhere have I seen guides on how to change fighting styles with the preservation, well, in general, I decided to write your own manualchik)

~ In enum pInfo:
PHP код:
pStyle// Combat style 
~ In public OnPlayerConnect:
PHP код:
PlayerInfo[playerid][pStyle] = 4// At a connection the player is given a normal fighting style 
~ In OnPlayerSave:
PHP код:
ini_setInteger(iniFile,"Style",PlayerInfo[playerid][pStyle]); 
~ In OnPlayerLogin:
PHP код:
ini_getInteger(iniFile,"Style",PlayerInfo[playerid][pStyle]); 
~ Team:
ZCMD:
PHP код:
CMD:style(playeridparams[]) return ShowPlayerDialog(playerid777DIALOG_STYLE_LIST"Buy combat style""ELBOW [500$] \nGRABKICK [1000$] \nKNEEHEAD [1500$] \nKUNGFU [5000$] \nBOXING [1000$] \nRemove the fighting style [FREE]""buy""closed"); 
OnPlayerCommandText ( not zcmd ):
PHP код:
if(!strcmp(cmd"/style"true)) return ShowPlayerDialog(playerid777DIALOG_STYLE_LIST"Buy combat style""ELBOW [500$] \nGRABKICK [1000$] \nKNEEHEAD [1500$] \nKUNGFU [5000$] \nBOXING [1000$] \nRemove the fighting style [FREE]""buy""closed"); 
~ In public OnPlayerSpawn:
PHP код:
SetPlayerFightingStyle(playeridPlayerInfo[playerid][pStyle]); 
~ In public OnDialogRespeone:
PHP код:
case 777:
{
switch(
listitem)
{
    case 
0PlayerInfo[playerid][pStyle] = 26,GivePlayerMoney(playerid,-500),SendClientMessage(playerid,-1,"{FFFFFF}You have successfully changed the style of fighting 'ELBOW'");
    case 
1PlayerInfo[playerid][pStyle] = 15,GivePlayerMoney(playerid,-1000),SendClientMessage(playerid,-1,"{FFFFFF}You have successfully changed the style of fighting 'GRABKICK'");
    case 
2PlayerInfo[playerid][pStyle] = 7,GivePlayerMoney(playerid,-1500),SendClientMessage(playerid,-1,"{FFFFFF}You have successfully changed the style of fighting 'KNEEHEAD'");
    case 
3PlayerInfo[playerid][pStyle] = 6,GivePlayerMoney(playerid,-5000),SendClientMessage(playerid,-1,"{FFFFFF}You have successfully changed the style of fighting 'KUNGFU'");
    case 
4PlayerInfo[playerid][pStyle] = 5,GivePlayerMoney(playerid,-100), SendClientMessage(playerid,-1,"{FFFFFF}You have successfully changed the style of fighting 'BOXING'");
    case 
5PlayerInfo[playerid][pStyle] = 4,SendClientMessage(playerid, -1"{FFFFFF}You have successfully removed the combat style");

Command is not 'paint', I think it's not so difficult

I apologize if I did not write in that section.

Author: Лев aka Lion Creighton



Re: Fighting Styles [+ preservation] - ♣Frosty♣ - 30.10.2012

Can you post it on pastebin?Takes!


Re: Fighting Styles [+ preservation] - Lion Creighton - 30.10.2012

Please http://pastebin.com/ag79XXsv


Re: Fighting Styles [+ preservation] - x96664 - 30.10.2012

Good job I like your idea cuz it saves the fighting style


Re: Fighting Styles [+ preservation] - Lion Creighton - 30.10.2012

Quote:
Originally Posted by x96664
Посмотреть сообщение
Good job I like your idea cuz it saves the fighting style
Thanks


Re: Fighting Styles [+ preservation] - Lion Creighton - 30.10.2012

UpUpUp


Re: Fighting Styles [+ preservation] - Plovix - 31.10.2012

Nice FS for beginners


Re: Fighting Styles [+ preservation] - Lion Creighton - 31.10.2012

Quote:
Originally Posted by Plovix
Посмотреть сообщение
Nice FS for beginners
Thanks