Moving gates problem 3 !
#7

No need to shout m8.

pawn Код:
public OnFilterScriptInit()
{
    for(new o; o < 3; o++) // Loops around all objects, there is 3 objects, so we will loop 3 times.
    {
       DestoryObject(o);
    }
    return 1;
}
That will destory every object, including the gate.

2).
secondly, you will have to add a if statement (A check) for your command.

pawn Код:
if(varible >= number) // if the varible is more or equals the number
{
    // do something, so in this case, put the MoveObject etc.
}
return 0; // If the varible is not more or does not equal the number, return 0 / False.
Here is a common example, this may not compile in your script!

pawn Код:
if(pdata[playerid][level] >= 1) // Playerid's level is more or equals 1.
{
    // Open the gate
    MoveObject(lpgate, 1548.571,-1634.002,14.058,3);
    SendClientMessage(playerid, COLOR_YELLOW,"Welcome to LSPD!");
    return 1;
}
return SendClientMessage(playerid, YOUR_DESIRED_COLOR, "Error: You are not high enough level."); // Returns a error message if you do not have a high enough level.

if(pdata[playerid][level] >=1) // Playerid's level is more of equals 1.
{
    // Closes the gate
    MoveObject(lpgate, 1548.571,-1627.423,14.058,3);
    SendClientMessage(playerid, COLOR_YELLOW,"Come back later.");
    return 1;
}
return SendClientMessage(playerid, YOUR_DESIRED_COLOR, "Error: You are not high enough level."); // Returns a error message if you do not have a high enough level.
Not tested, but should work.
Replace ' pdata[playerid][level] ' with the array that defines the level of the player.
Reply


Messages In This Thread
Moving gates problem 3 ! - by Kirchhoff - 06.04.2010, 08:23
Re: Moving gates problem 3 ! - by Last_Stand_Guardian - 06.04.2010, 09:08
Re: Moving gates problem 3 ! - by Kirchhoff - 06.04.2010, 09:10
Re: Moving gates problem 3 ! - by Last_Stand_Guardian - 06.04.2010, 09:23
Re: Moving gates problem 3 ! - by Kirchhoff - 06.04.2010, 09:41
Re: Moving gates problem 3 ! - by Kirchhoff - 06.04.2010, 09:43
Re: Moving gates problem 3 ! - by Joe_ - 06.04.2010, 10:00
Re: Moving gates problem 3 ! - by Kirchhoff - 06.04.2010, 10:17
Re: Moving gates problem 3 ! - by Joe_ - 06.04.2010, 10:39
Re: Moving gates problem 3 ! - by Kirchhoff - 07.04.2010, 14:48

Forum Jump:


Users browsing this thread: 1 Guest(s)