if(strcmp(cmdtext, "/aopen", true) == 0)
{
if (IsPlayerAdmin(playerid))
{
MoveObject(admingate, 1010.09375, 1844.1826171875, 15.902549743652, 2.0);// Last number is speed
SendClientMessage(playerid, COLOR_RED, "The gate is open");
return 1;
}
}
if(strcmp(cmdtext, "/aclose", true) == 0)
{
if (IsPlayerAdmin(playerid))
{
MoveObject(admingate, 1010.09375, 1844.1826171875, 11.402549743652, 2.0);
SendClientMessage(playerid, COLOR_RED, "The Gate Is closed Now");
return 1;
}
}
C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(251) : error 028: invalid subscript (not an array or too many subscripts): "IsPlayerAdmin" C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(256) : warning 209: function "OnPlayerCommandText" should return a value C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(258) : error 010: invalid function or declaration C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(260) : error 010: invalid function or declaration C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(264) : error 010: invalid function or declaration C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(267) : error 010: invalid function or declaration C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(669) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
?
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/aopen", true) == 0)
{
if (IsPlayerAdmin(playerid))
{
MoveObject(admingate, 1010.09375, 1844.1826171875, 15.902549743652, 2.0);// Last number is speed
SendClientMessage(playerid, COLOR_RED, "The gate is open");
return 1;
}
}
if(strcmp(cmdtext, "/aclose", true) == 0)
{
if (IsPlayerAdmin(playerid))
{
MoveObject(admingate, 1010.09375, 1844.1826171875, 11.402549743652, 2.0);
SendClientMessage(playerid, COLOR_RED, "The Gate Is closed Now");
return 1;
}
}
return 0;
}
|
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(251) : error 028: invalid subscript (not an array or too many subscripts): "IsPlayerAdmin" C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(256) : warning 209: function "OnPlayerCommandText" should return a value C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(258) : error 010: invalid function or declaration C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(260) : error 010: invalid function or declaration C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(264) : error 010: invalid function or declaration C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(267) : error 010: invalid function or declaration C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(669) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors. ? |
C:\Program Files\Rockstar Games\GTA San Andreas\sampserver0.3c\gamemodes\lvdm.pwn(256) : warning 209: function "OnPlayerCommandText" should return a value
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/aopen", true) == 0)
{
if (IsPlayerAdmin(playerid))
{
MoveObject(admingate, 1010.09375, 1844.1826171875, 15.902549743652, 2.0);// Last number is speed
SendClientMessage(playerid, COLOR_RED, "The gate is open");
return 1;
}
}
if(strcmp(cmdtext, "/aclose", true) == 0)
{
if (IsPlayerAdmin(playerid))
{
MoveObject(admingate, 1010.09375, 1844.1826171875, 11.402549743652, 2.0);
SendClientMessage(playerid, COLOR_RED, "The Gate Is closed Now");
return 1;
}
}
return 0;
}

|
Post the code. |
admingate = CreateObject (7657, 1010.09375, 1844.1826171875, 11.402549743652, 0, 0, 179.99450683594); //gate
public OnGameModeInit()
{