SA-MP Forums Archive
Look please help - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Look please help (/showthread.php?tid=158417)



Look please help - [ECA]Godfather - 09.07.2010

I need help please,I need a good scripter who can help me at script on a clan base add me a gates open with Key_Fire
Please.


Re: Look please help - V1ceC1ty - 12.07.2010

Edit the appropriate functions to fit your script.

pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

new gate;

public OnGameModeInit()
{
    gate = CreateObject(objectid, objectx, objecty, objectz, xrotation, yrotation, zrotation);
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE))
    {
        if(IsPlayerInRangeOfPoint(playerid, range, objectx,objecty,objectz))
        {
            MoveObject(gate, newx, newy, newz, speed);
        }
    }
    return 1;
}



Re: Look please help - felipex - 14.07.2010

Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

new gate;

public OnFilterScriptInit() // change just here duh'
{
    gate = CreateObject(objectid, objectx, objecty, objectz, xrotation, yrotation, zrotation);
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE))
    {
        if(IsPlayerInRangeOfPoint(playerid, range, objectx,objecty,objectz))
        {
            MoveObject(gate, newx, newy, newz, speed);
        }
    }
    return 1;
}