LSPD Impound Lot - 1 Warning
#1

Alright, Heres my code.
http://pastebin.com/2jSNC2a4 - If you wan't the .pwn, Tell me

(Im EXTREMELY new to scripting, I know nothing.
So if you would help me out and explain in noob terms)

I'm trying to make a filterscript that will load a map (The Impound) and when you type /impound the gate will open and close in 7 seconds.

I keep getting the error:
C:\Documents and Settings\REMOVED\Desktop\Callums-LSPD-Impound.pwn(12) : warning 204: symbol is assigned a value that is never used: "Impound"

Any help is greatly appreciated.
Regards,
- Callump01
Reply
#2

pawn Код:
#include <a_samp>

forward close();
new Impound;
#define RED 0xFF0000AA

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Callum's LSPD Upgrade/Impound Lot Loaded");
    print("--------------------------------------\n");
    Impound = CreateObject(968, 1581.0300292969, -1616.9389648438, 13.382811546326, 0, 90, 0);
     // CreateObject(968, 1581.0300292969, -1616.9389648438, 13.382811546326, 0, 90, 0); // impound gate closed
    CreateObject(967, 1580.0997314453, -1616.1834716797, 12.3828125, 0, 0, 270);
    CreateObject(987, 1567.3851318359, -1616.9389648438, 12.3828125, 0, 0, 0);
    CreateObject(987, 1555.2904052734, -1616.9389648438, 12.3828125, 0, 0, 0);
    CreateObject(1231, 1563.1651611328, -1604.3659667969, 15.113204956055, 0, 0, 0);
    CreateObject(1231, 1574.6550292969, -1604.1734619141, 15.113204956055, 0, 0, 0);
    CreateObject(1231, 1586.0224609375, -1603.9351806641, 15.113204956055, 0, 0, 0);
    CreateObject(1231, 1605.7326660156, -1608.7971191406, 15.113204956055, 0, 0, 90);
    CreateObject(1231, 1603.4270019531, -1604.0081787109, 15.113204956055, 0, 0, 0);
    CreateObject(1231, 1593.1727294922, -1604.0789794922, 15.113204956055, 0, 0, 0);
    CreateObject(1231, 1605.1492919922, -1614.8934326172, 15.113204956055, 0, 0, 90);
    CreateObject(1231, 1541.2479248047, -1615.5178222656, 15.113204956055, 0, 0, 90);
    CreateObject(1231, 1541.4140625, -1608.8115234375, 15.113204956055, 0, 0, 90);
    CreateObject(987, 1543.3937988281, -1616.9265136719, 12.3828125, 0, 0, 0);
    CreateObject(987, 1588.5130615234, -1616.9389648438, 12.3828125, 0, 0, 0);
    CreateObject(1231, 1549.3758544922, -1604.4600830078, 15.113204956055, 0, 0, 0);
    CreateObject(987, 1596.2055664063, -1616.9389648438, 12.3828125, 0, 0, 0);
    CreateObject(966, 1581.2856445313, -1616.9389648438, 12.392286300659, 0, 0, 180);
    CreateObject(987, 1540.1708984375, -1616.9389648438, 12.3828125, 0, 0, 0);
    CreateObject(987, 1607.3515625, -1617.240234375, 12.3828125, 0, 0, 90);
    CreateObject(987, 1607.5405273438, -1614.24609375, 12.3828125, 0, 0, 90);
    CreateObject(987, 1540.2659912109, -1616.8984375, 12.3828125, 0, 0, 90);
    CreateObject(987, 1540.3493652344, -1614.9000244141, 12.3828125, 0, 0, 90);
    CreateObject(987, 1552.4903564453, -1603.2823486328, 12.3828125, 0, 0, 180);
    CreateObject(987, 1564.4067382813, -1603.2318115234, 12.3828125, 0, 0, 179.99450683594);
    CreateObject(987, 1576.40625, -1603.2318115234, 12.3828125, 0, 0, 179.99450683594);
    CreateObject(987, 1588.3946533203, -1603.30859375, 12.3828125, 0, 0, 179.99450683594);
    CreateObject(987, 1600.2738037109, -1603.2318115234, 12.3828125, 0, 0, 179.99450683594);
    CreateObject(987, 1607.7922363281, -1603.2318115234, 12.3828125, 0, 0, 179.99450683594);
    CreateObject(10183, 1561.90625, -1607.6296386719, 12.394755363464, 0, 0, 46);
    CreateObject(10183, 1597.1435546875, -1607.1671142578, 12.443516731262, 0, 0, 46);
    CreateObject(1319, 1546.2805175781, -1674.4237060547, 13.108882904053, 0, 0, 0);
    CreateObject(1319, 1546.19921875, -1676.4208984375, 13.108882904053, 0, 0, 0);
    CreateObject(2614, 1555.7987060547, -1675.6774902344, 18.898622512817, 0, 0, 270);
    return 1;

}

main()
{
    print("\n----------------------------------");
    print(" Callum's LSPD Upgrade/Impound Lot Unloaded");
    print("----------------------------------\n");
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/impound", true) == 0)
    {
        SetObjectRot(Impound, 0.00, 0.00, 90.00);
        SetObjectPos(Impound, 1581.0300292969, -1616.9389648438, 13.382811546326);
        SetTimer("close", 7000, 0); //gate will be  closed for 7 seconds
        SendClientMessage(playerid,RED,"LSPD Impound Gate Open, It will be closed automaticly in 7 seconds..");
        return 1;
    }
    return 0;
}
public close()
{
            SetObjectRot(Impound, 0.00, 0.00, 0.00);
            SetObjectPos(Impound, 1581.0300292969, -1616.9389648438, 13.382811546326);
}
Learn indention.
Reply
#3

Thanks, Worked.
But one problem: When you type /impound the gate opens but after 7 seconds it dosen't close.
And it just rotates.

Thanks in advance.
Regards,
- Callump01
Reply
#4

in the public move u have to do SetObjectPos(impound,closedx,closedy,closedz);
ofcourse replace the closedx,y,z with the co-ordinates of the closed gate...
I'm offering to help you for this small problems, since its saturday... im terrible bored.. and got nothing to do =)c
check ur pm
Reply
#5

pawn Код:
public close()
{
            SetObjectRot(Impound, 0.00, 0.00, 0.00);
            SetObjectPos(Impound, 1581.0300292969, -1616.9389648438, 13.382811546326);
}
Reply
#6

Lol, talked on him on MSN and he told me its a barrier... and the co-ordinates of public close where the opened co-ords and now hes testing.... we deleted the SetObjectPos and did SetObjectRot(Impound, 0, 90, 0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)