Problem
#1

This is the warnings:
Код:
C:\Documents and Settings\*\Desktop\*\gamemodes\RRP.pwn(16958) : warning 202: number of arguments does not match definition
C:\Documents and Settings\*\Desktop\*\gamemodes\RRP.pwn(16965) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Line 16958:
Код:
MoveObject(pddoor1, 1294.02, -1021.05, 1084.97); // Moves the object.
Line: 16965:
Код:
MoveObject(pddoor1, 1292.96, -1021.05, 1084.97); // Move the object back to their old co-ordinates.
Whole Thing:
Код:
   if(newkeys & KEY_SECONDARY_ATTACK) // KEY_LOOK_BEHIND is MMB (middle mouse button).
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1293.5813,-1020.5617,1085.9760)) // Checks if the player is in the area of the gate.
        {
            if(pddoor1opened == false) // if pdgateopened is 'false'.
            {
                MoveObject(pddoor1, 1294.02, -1021.05, 1084.97); // Moves the object.
                ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
                pddoor1opened = true; // Sets the 'pdgateopened' variable to 'true' which is equivalent to 1.
                return 1;
            }
            else // If pdgateopened is 'true'.
            {
                MoveObject(pddoor1, 1292.96, -1021.05, 1084.97); // Move the object back to their old co-ordinates.
                ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
                pddoor1opened = false; // Sets the 'pdgateopened' variable to 'false' which is 0.
                return 1;
            }
        }
    }
    return 1;
}
Reply
#2

https://sampwiki.blast.hk/wiki/MoveObject
Reply
#3

yout forget to put the speed of moving

That shoul look something like this:


MoveObject(pddoor1, 1294.02, -1021.05, 1084.97, 5.0); // Moves the object.
Reply
#4

you didn't add moving speed of the object.
pawn Код:
MoveObject(pddoor1, 1294.02, -1021.05, 1084.97, 3.1);
EDIT : ups , the poster above was faster
Reply
#5

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_SECONDARY_ATTACK)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1293.5813,-1020.5617,1085.9760))
        {
            if(pddoor1opened == false)
            {
                MoveObject(pddoor1, 1294.02, -1021.05, 1084.97, 4.0);
                ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
                pddoor1opened = true;
                return 1;
            }
            else
            {
                MoveObject(pddoor1, 1292.96, -1021.05, 1084.97, 4.0);
                ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
                pddoor1opened = false;
                return 1;
            }
        }
    }
    return 1;
}
Se ajudei da reputation
Reply
#6

Quote:
Originally Posted by MarkoN
Посмотреть сообщение
you didn't add moving speed of the object.
pawn Код:
MoveObject(pddoor1, 1294.02, -1021.05, 1084.97, 3.1);
EDIT : ups , the poster above was faster
This is it. Thank you very much. Rep + to all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)