Gate help
#1

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;
}
Reply
#2

PHP код:
new gatestatus;
CMD:gate(playerid,poparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid15.02294.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;

Reply
#3

Add this on the top of your script
Код:
new gStatus;
pawn Код:
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;
}
Reply
#4

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.
Reply
#5

Look for a line that says "new movegate" and delete it.
Reply
#6

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?
Reply
#7

Look for "movegate" ONLY without the "new" and delete it.
Reply
#8

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;
}
Reply
#9

How come that's the only one you got in your WHOLE script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)