CreateObject(2990,2479.87768555,-1720.38623047,16.46136665,0.00000000,0.00000000,179.99993896); //object(wongs_gate) (1)
if (strcmp("/open", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFFCFFF, " You've opened the gate please close it ");
MoveObject(2990,2479.87768555,-1720.38623047,16.46136665,0.00000000,0.00000000,179.99993896,1);
SetTimer("close", 10000, 0);//the gate will close after 10 seconds
return 1;
}
if (strcmp("/close", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFFCFFF, " You've closed the gate thanks for closing it ");
MoveObject(2990,2479.87768555,-1720.38623047,16.46136665,0.00000000,0.00000000,179.99993896,0);
//on top
new IsOpened,Gate;
//OnGameModeinit
Gate = CreateObject(2990,2479.87768555,-1720.38623047,16.46136665,0.00000000,0.00000000,179.99993896);
IsOpened=0;
if (strcmp("/open", cmdtext, true, 10) == 0)
{
if(IsOpened == 1) return SendClientMessage(playerid, 0xFFFCFFF, " The Gate Is Already Opened ");
IsOpened =1;
SendClientMessage(playerid, 0xFFFCFFF, " You've opened the gate please close it ");
MoveObject(Gate,2479.87768555,-1720.38623047,10.46136665,3.00,0.00000000,0.00000000,179.99993896);
SetTimer("close", 10000, 0);//the gate will close after 10 seconds
return 1;
}
if (strcmp("/close", cmdtext, true, 10) == 0)
{
if(IsOpened == 0) return SendClientMessage(playerid, 0xFFFCFFF, " The Gate Is Already Closed ");
IsOpened =0;
MoveObject(Gate,2479.87768555,-1720.38623047,16.46136665,3.00,0.00000000,0.00000000,179.99993896);
}
forward close();
public close()
{
If(IsOpened == 1)
{
MoveObject(Gate,2479.87768555,-1720.38623047,16.46136665,3.00,0.00000000,0.00000000,179.99993896);
IsOpened=0;
}
}
AMEMO~1\s.pwn(43) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(43) : error 017: undefined symbol "IsOpened"
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(43) : warning 215: expression has no effect
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(43) : error 017: undefined symbol "Gate"
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(45) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(55) : warning 202: number of arguments does not match definition
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(56) : warning 202: number of arguments does not match definition
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(57) : warning 213: tag mismatch
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(106) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(112) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(117) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(119) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(122) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(127) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(129) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(132) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(137) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(139) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(141) : error 017: undefined symbol "IsOpened"
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(142) : error 017: undefined symbol "IsOpened"
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(142) : warning 215: expression has no effect
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(144) : error 017: undefined symbol "Gate"
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(147) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(151) : error 017: undefined symbol "IsOpened"
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(152) : error 017: undefined symbol "IsOpened"
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(152) : warning 215: expression has no effect
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(153) : error 017: undefined symbol "Gate"
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(155) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(158) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(160) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(163) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(165) : warning 217: loose indentation
C:\DOCUME~1\admin\Desktop\NEWFOL~3\GAMEMO~1\s.pwn(169) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
8 Errors.
new IsOpened[MAX_PLAYERS];
if(IsOpened[playerid] == 1) return SendClientMessage(playerid, 0xFFFCFFF, " The Gate Is Already Opened ");
Try
pawn Код:
|