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.
MoveObject(pddoor1, 1294.02, -1021.05, 1084.97); // Moves the object.
MoveObject(pddoor1, 1292.96, -1021.05, 1084.97); // Move the object back to their old co-ordinates.
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; }
MoveObject(pddoor1, 1294.02, -1021.05, 1084.97, 3.1);
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;
}
you didn't add moving speed of the object.
pawn Код:
|