[Include] Seif_Sprint (New Way of Walking) FOR OTACON
#1

http://*********/KkUut5mPwOc

[] Funtion:
pawn Код:
SetPlayerSprintStyle(playerid, style);
[] Running Style:
pawn Код:
SetPlayerSprintStyle(playerid, SPRINT_NORMAL); //Normal
SetPlayerSprintStyle(playerid, SPRINT_CIVIL); //Civil
SetPlayerSprintStyle(playerid, SPRINT_FAT); //Fat1
SetPlayerSprintStyle(playerid, SPRINT_FATOLD); //Fat 2
SetPlayerSprintStyle(playerid, SPRINT_GANGSTA); //Gangster
SetPlayerSprintStyle(playerid, SPRINT_WUZI); //blind
SetPlayerSprintStyle(playerid, SPRINT_PANIC); //Panic
SetPlayerSprintStyle(playerid, SPRINT_OLD); //old
[] Example/Test:
pawn Код:
#include <a_samp>
#include <seif_sprint>

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/Runningstyles", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Choose your form of run","runNormal\nrunCivil\nrunfat 1\nrunfat 2\nrunGanster\nrunblind\nrunPanic\nrunold","accept","Cancel");
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 3)
    {
        if(response)
        {
            switch(listitem)
            {
              case 0: {SetPlayerSprintStyle(playerid, SPRINT_NORMAL); SendClientMessage(playerid, -1, "Running selected the Normal style");}
              case 1: {SetPlayerSprintStyle(playerid, SPRINT_CIVIL); SendClientMessage(playerid, -1, "Running selected the Civil style");}
              case 2: {SetPlayerSprintStyle(playerid, SPRINT_FAT); SendClientMessage(playerid, -1, "Running selected the fat 1 style");}
              case 3: {SetPlayerSprintStyle(playerid, SPRINT_FATOLD); SendClientMessage(playerid, -1, "Running selected the fat 2 style");}
              case 4: {SetPlayerSprintStyle(playerid, SPRINT_GANGSTA); SendClientMessage(playerid, -1, "Running selected the Gangster style");}
              case 5: {SetPlayerSprintStyle(playerid, SPRINT_WUZI); SendClientMessage(playerid, -1, "Running selected the blind style");}
              case 6: {SetPlayerSprintStyle(playerid, SPRINT_PANIC); SendClientMessage(playerid, -1, "Running selected the Panic style ");}
              case 7: {SetPlayerSprintStyle(playerid, SPRINT_OLD); SendClientMessage(playerid, -1, "Running selected the old style ");}
            }
        }
    }
    return 1;
}
[] Download:


[] Password:
Otacon
http://pastebin.com/mw48eaCe

[] Credits:
OTACON = Modification <--------I Am Otacon!
Seif = Creator code
Reply
#2

Nice FS, but it's so hard to download..
Wait time, captcha, unzip and insert password.. What's wrong with pastebin or solidfiles? :\
Reply
#3

When you have pastebin, mediafire, solidfiles & many other popular and good file hosting sites, why do you have to upload it to deposit files and waste 20 seconds of our life + the annoying captcha + a password?
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
So if Seif wrote the code and Octagon modified it (in what way btw), what did you do to release it?
Wondering the same thing.
Reply
#5

Someone can upload this stuff in mediafire,pastebin or solidfiles?

Or should I:
Код:
im gonna create include and add images and show how it functions.But will keep broken links...and earn respect and slaps. :P
Dont take this seriouS!
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
So if Seif wrote the code and Octagon modified it (in what way btw), what did you do to release it?
Octagon is Otacon not: P

and I'm Otacon
Reply
#7

Quote:
Originally Posted by bytytus
Посмотреть сообщение
Octagon is Otacon not: P

and I'm Otacon
Reply
#8

Quote:

if (((newkeys & KEY_SPRINT && newkeys & KEY_UP) || (newkeys & KEY_SPRINT && newkeys & KEY_DOWN) || (newkeys & KEY_SPRINT && newkeys & KEY_LEFT) || (newkeys & KEY_SPRINT && newkeys & KEY_RIGHT))
|| ((oldkeys & KEY_SPRINT && newkeys & KEY_UP) || (oldkeys & KEY_SPRINT && newkeys & KEY_DOWN) || (oldkeys & KEY_SPRINT && newkeys & KEY_LEFT) || (oldkeys & KEY_SPRINT && newkeys & KEY_RIGHT))
|| ((newkeys & KEY_SPRINT && oldkeys & KEY_UP) || (newkeys & KEY_SPRINT && oldkeys & KEY_DOWN) || (newkeys & KEY_SPRINT && oldkeys & KEY_LEFT) || (newkeys & KEY_SPRINT && oldkeys & KEY_RIGHT))
&& GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)

Do you really need all of that?
Reply
#9

I care not what You Say, just answered what I asked ******.

PD: costel_nistor96 Go get Milk: p

EDIT: sampreader, It was only a modification of existing Include.

and of course you can do everything shorter, but I said above or tel.
Reply
#10

http://forum.sa-mp.com/forumdisplay.php?f=9
Reply
#11

Oh holy grammar, where did you learn english?
But back to the topic, there's too many else if statements, you could use a switch statement instead of them. Also, GetPlayerSprintStyle is a useless function, you can get the value from the variable without calling that function. I checked seif_walk (original script) and I didn't notice important changes, so I don't get why did you release this. I noticed that it's possible to do some optimisations, but I won't list them because I have no time right now.
Reply
#12

If this works, I'll Rep+ you.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)