Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Felhasznált include: seif_walk.inc
- Készítette: Dario_Juarez
- */
- #include <a_samp>
- #define FILTERSCRIPT
- //dialog
- #define HARCSTILUS 1111
- #define SÉTASTILUS 1112
- //séta stílusok
- #define WALK_DEFAULT 0
- #define WALK_NORMAL 1
- #define WALK_PED 2
- #define WALK_GANGSTA 3
- #define WALK_GANGSTA2 4
- #define WALK_OLD 5
- #define WALK_FAT_OLD 6
- #define WALK_FAT 7
- #define WALK_LADY 8
- #define WALK_LADY2 9
- #define WALK_WHORE 10
- #define WALK_WHORE2 11
- #define WALK_DRUNK 12
- #define WALK_BLIND 13
- //színek
- #define ZOLD 0x33AA33AA
- #if defined FILTERSCRIPT
- new walktime[MAX_PLAYERS];
- new WalkStyle[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\nF&W Styles By: Dario_Juarez loaded.\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\nF&W Styles By: Dario_Juarez unloaded.\n");
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (((newkeys & KEY_WALK && newkeys & KEY_UP) || (newkeys & KEY_WALK && newkeys & KEY_DOWN) || (newkeys & KEY_WALK && newkeys & KEY_LEFT) || (newkeys & KEY_WALK && newkeys & KEY_RIGHT))
- || ((oldkeys & KEY_WALK && newkeys & KEY_UP) || (oldkeys & KEY_WALK && newkeys & KEY_DOWN) || (oldkeys & KEY_WALK && newkeys & KEY_LEFT) || (oldkeys & KEY_WALK && newkeys & KEY_RIGHT))
- || ((newkeys & KEY_WALK && oldkeys & KEY_UP) || (newkeys & KEY_WALK && oldkeys & KEY_DOWN) || (newkeys & KEY_WALK && oldkeys & KEY_LEFT) || (newkeys & KEY_WALK && oldkeys & KEY_RIGHT))
- && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- return 1;
- }
- forward Walk_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
- #define OnPlayerKeyStateChange Walk_OnPlayerKeyStateChange
- forward WalkAnim(playerid);
- public WalkAnim(playerid)
- {
- new keys, updown, leftright;
- GetPlayerKeys(playerid,keys,updown,leftright);
- if (GetPlayerWalkingStyle(playerid) == WALK_NORMAL)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WALK_player",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WALK_player",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_PED)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WALK_civi",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WALK_civi",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_GANGSTA)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WALK_gang1",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WALK_gang1",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_GANGSTA2)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WALK_gang2",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WALK_gang2",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_OLD)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WALK_old",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WALK_old",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_FAT_OLD)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WALK_fatold",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WALK_fatold",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_FAT)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WALK_fat",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WALK_fat",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_LADY)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WOMAN_walknorm",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WOMAN_walknorm",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_LADY2)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WOMAN_walkbusy",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WOMAN_walkbusy",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_WHORE)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WOMAN_walkpro",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WOMAN_walkpro",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_WHORE2)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WOMAN_walksexy",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WOMAN_walksexy",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_DRUNK)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","WALK_drunk",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","WALK_drunk",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- else if (GetPlayerWalkingStyle(playerid) == WALK_BLIND)
- {
- if ((keys & KEY_WALK && updown & KEY_UP) || (keys & KEY_WALK && updown & KEY_DOWN) || (keys & KEY_WALK && leftright & KEY_LEFT) || (keys & KEY_WALK && leftright & KEY_RIGHT))
- {
- KillTimer(walktime[playerid]);
- ApplyAnimation(playerid,"PED","Walk_Wuzi",4.1,1,1,1,1,1);
- walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
- }
- else ApplyAnimation(playerid,"PED","Walk_Wuzi",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
- }
- return 1;
- }
- stock SetPlayerWalkingStyle(playerid, style)
- {
- WalkStyle[playerid] = style;
- }
- stock GetPlayerWalkingStyle(playerid)
- {
- return WalkStyle[playerid];
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == HARCSTILUS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
- SendClientMessage(playerid, ZOLD, " Harcstílus megváltoztatva !");
- }
- if(listitem == 1)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
- SendClientMessage(playerid, ZOLD, " Harcstílus megváltoztatva !");
- }
- if(listitem == 2)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
- SendClientMessage(playerid, ZOLD, " Harcstílus megváltoztatva !");
- }
- if(listitem == 3)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
- SendClientMessage(playerid, ZOLD, " Harcstílus megváltoztatva !");
- }
- if(listitem == 4)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
- SendClientMessage(playerid, ZOLD, " Harcstílus megváltoztatva !");
- }
- if(listitem == 5)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
- }
- }
- }
- if(dialogid == SÉTASTILUS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPlayerWalkingStyle (playerid, WALK_NORMAL);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 1)
- {
- SetPlayerWalkingStyle (playerid, WALK_PED);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 2)
- {
- SetPlayerWalkingStyle (playerid, WALK_GANGSTA);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 3)
- {
- SetPlayerWalkingStyle (playerid, WALK_GANGSTA2);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 4)
- {
- SetPlayerWalkingStyle (playerid, WALK_OLD);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 5)
- {
- SetPlayerWalkingStyle (playerid, WALK_FAT_OLD);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 6)
- {
- SetPlayerWalkingStyle (playerid, WALK_FAT);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 7)
- {
- SetPlayerWalkingStyle (playerid, WALK_LADY);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 8)
- {
- SetPlayerWalkingStyle (playerid, WALK_LADY2);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 9)
- {
- SetPlayerWalkingStyle (playerid, WALK_WHORE);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 10)
- {
- SetPlayerWalkingStyle (playerid, WALK_WHORE2);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 11)
- {
- SetPlayerWalkingStyle (playerid, WALK_DRUNK);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 12)
- {
- SetPlayerWalkingStyle (playerid, WALK_BLIND);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- if(listitem == 13)
- {
- SetPlayerWalkingStyle (playerid, WALK_DEFAULT);
- SendClientMessage(playerid, ZOLD, "style de marche changé!");
- }
- }
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/harcstílus", cmdtext, true, 10) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- {
- ShowPlayerDialog(playerid, HARCSTILUS, DIALOG_STYLE_LIST, "Harci Stílusok", "Box\nElbow\nKneehead\nKung-Fu\nGrabKick\nNormál", "Kiválaszt", "Mégse");
- }
- }
- return 1;
- }
- if (strcmp("/style", cmdtext, true, 10) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- {
- ShowPlayerDialog(playerid, SÉTASTILUS, DIALOG_STYLE_LIST, "Differents style de marche", "Normál\nDécidé\nGangsta\nGangsta2\nAgée\nAgée2\nBoiteux\nFéminin1\nFéminin2\nPetasse\nPetasse2\nIvre\nHomme d'affaire\nNormal2", "Choisir", "Annuler");
- }
- }
- return 1;
- }
- return 0;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement