Posts: 200
Threads: 28
Joined: Jul 2012
Reputation:
0
Anyone know how to make it so I can make multiple gates for one command?
CMD: opengate(playerid,params[])
{
IsPlayerInRangeOfPoint(playerid, 15.0, 2294.39990234,2499.00000000,10.39999962);
MoveObject(gate,2294.39990234,2499.00000000,10.399 99962,3);
return 1;
}
CMD:closegate(playerid,params[])
{
IsPlayerInRangeOfPoint(playerid, 15.0, 2294.39990234,2499.00000000,10.39999962);
MoveObject(gate,2294.39990234,2499.00000000,5.0999 9990,3);
return 1;
}
Posts: 1,219
Threads: 51
Joined: Jul 2012
PHP код:
new gatestatus;
CMD:gate(playerid,poparams[])
{
if(IsPlayerInRangeOfPoint(playerid, 15.0, 2294.39990234,2499.00000000,10.39999962))
{
if(gatestatus != 1)
{
MoveObject(gate,2294.39990234,2499.00000000,10.399 99962,3);
gatestatus = 1;
}
else if(gatestatus == 1)
{
MoveObject(gate,2294.39990234,2499.00000000,5.0999 9990,3);
gatestatus = 0;
}
}
return 1;
}
Posts: 200
Threads: 28
Joined: Jul 2012
Reputation:
0
When I add these two, they seem to give me these errors:
C:\Users\Krakuski\Desktop\Las Venturas Roleplay\gamemodes\Betaserver.pwn(236) : warning 203: symbol is never used: "movegate"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Posts: 985
Threads: 13
Joined: Sep 2011
Reputation:
0
Look for a line that says "new movegate" and delete it.
Posts: 200
Threads: 28
Joined: Jul 2012
Reputation:
0
I dont happen to have a line named "new movegate", I tried to find it with the find tool, and it didnt come up. Any other suggestions?
Posts: 985
Threads: 13
Joined: Sep 2011
Reputation:
0
Look for "movegate" ONLY without the "new" and delete it.
Posts: 200
Threads: 28
Joined: Jul 2012
Reputation:
0
This is the ONLY "movegate" in my script, I believe the script needs something added to it, I just cant put my finger on it.
CMD:movegate(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid, 15.0, 2294.39990234,2499.00000000,10.39999962))
{
if(gStatus == 0)
{
MoveObject(gate,2294.39990234,2499.00000000,10.399 99962,3);
SendClientMessage(playerid, COLOR_GREY, "You successfuly opened the gate");
gStatus = 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 2294.39990234,2499.00000000,10.39999962))
{
if(gStatus == 1)
{
MoveObject(gate,2294.39990234,2499.00000000,5.0999 9990,3);
SendClientMessage(playerid, COLOR_GREY, "You successfuly closed the gate");
gStatus = 0;
}
}
return 1;
}