if IsPlayerInRangeOfPoint(playerid, 1.5,2680.30444336,3969.71020508,7.33100510)) { MoveObject(boxes, 2683.57153320,3966.04736328,7.33100510, 2.2500000); SetTimer("boxes", 4500, false); } and some errors C:\Documents and Settings\Minde\Desktop\Server 3c\pawno\include\streamer.inc(435) : warning 202: number of arguments does not match definition C:\Documents and Settings\Minde\Desktop\Server 3c\pawno\include\streamer.inc(449) : warning 202: number of arguments does not match definition C:\DOCUME~1\Minde\Desktop\SERVER~1\FILTER~1\miestas.pwn(20) : warning 217: loose indentation C:\DOCUME~1\Minde\Desktop\SERVER~1\FILTER~1\miestas.pwn(596) : warning 217: loose indentation C:\DOCUME~1\Minde\Desktop\SERVER~1\FILTER~1\miestas.pwn(24) : warning 204: symbol is assigned a value that is never used: "boxes" C:\DOCUME~1\Minde\Desktop\SERVER~1\FILTER~1\miestas.pwn(24 -- 598) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
#define doorPw "MyCatIsDumb"
new bool:DoorStatus;
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK && IsPlayerInRangeOfPoint(playerid, 1.5, 2680.30444336, 3969.71020508, 7.33100510))
{
ShowPlayerDialog(playerid, 1, 1, "Doors", "Please type in the password to continue:", "Go", "Cancel");
}
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(!strcmp(inputtext, doorPw, false))
{
if(!DoorStatus)
{
MoveObject(boxes, 2683.57153320,3966.04736328,7.33100510, 2.2500000, 2.0);
SetTimer("boxes", 4500, false);
}
return 1;
}
else return ShowPlayerDialog(playerid, 2, 0, "Error", "That's not the right password!", "Ok", "");
}
return 0;
}
forward CloseDoors();
public CloseDoors()
{
if(DoorStatus)
{
MoveObject(boxes, 2683.57153320,3966.04736328,7.33100510, 2.2500000, 2.0); // close the doors here
}
return 1;
}
MoveObject(boxes, 2683.57153320,3966.04736328,7.33100510, 2.2500000, 2.0); // This is the default you gave us, should probably be changed.
Did you remember to change the co-ordinates for the moved object?
pawn Код:
|