06.04.2010, 10:00
No need to shout m8.
That will destory every object, including the gate.
2).
secondly, you will have to add a if statement (A check) for your command.
Here is a common example, this may not compile in your script!
Not tested, but should work.
Replace ' pdata[playerid][level] ' with the array that defines the level of the player.
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;
}
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.
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.
Replace ' pdata[playerid][level] ' with the array that defines the level of the player.