--> Help With a CMD <--
#1

Hi everybody, i have that ironman cmd, but it doesn't fly )
pawn Код:
on top:
new
    bool:flying[MAX_PLAYERS],
    Javelin[MAX_PLAYERS][2],
    Float:JavPos[MAX_PLAYERS][3];

on player command text:

  if(!strcmp(cmdtext, "/ironman", true))
    {
        if((flying[playerid] = !flying[playerid]))
        {
            new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x, y, z);
            SetPlayerHealth(playerid, 1000000000.0);
            SetTimerEx("IronMan", 100, 0, "d", playerid);
            SetTimerEx("DestroyMe", 500, 0, "d", CreateObject(2780, x, y, z - 3.0, 0.0, 0.0, 0.0));
            ShowPlayerDialog(playerid,91,DIALOG_STYLE_MSGBOX,"{6EF83C}Ironman", "{FF00EA}Ironman: {6EF83C}ON \n{FFFFFF}Scrie {6EF83C}/ironman {FFFFFF}ca sa-l dezactivezi.", "Ok", "" );
            }
            else
            SetPlayerHealth(playerid, 100.0);
        return 1;
    }
Reply
#2

Код:
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+10);
You won't fly, it will just put your player a couple meters higher.

You could also try creating a timer and checking if a key is pressed.
If a key is pressed add 1 to the z variable.
Reply
#3

Check the flymode.pwn filterscript included by default in the SA-MP 0.3e server, might help you
Reply
#4

What i have to do to make it to fly?
Reply
#5

Quote:
Originally Posted by xSkullx
Посмотреть сообщение
What i have to do to make it to fly?
Check this flymode.pwn. Just copy everything where it belongs in your FS / GM. Or even better, simply use that FS.
Reply
#6

Quote:
Originally Posted by xSkullx
Посмотреть сообщение
What i have to do to make it to fly?
Yea, the flymode.pwn should work pretty well.
Reply
#7

Solved.
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)