HELP: waring 209:.... -
ZumFax - 28.02.2016
now i really need help, i have warning like that, but why??


: warning 209: function "cmd_mpost" should return a value
PHP код:
//mechanic barrier
CMD:mpost(playerid, params[])
if(KasutajaInfo[playerid][Group] == 8 || KasutajaInfo[playerid][Admin] >= 2)
{
if(Gate[playerid]==0)
{
if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1700.0000000, -1860.2000000, 13.4000000)) return SendClientMessage(playerid, blue, "You are not close enough!");
MoveObject(Gate[7], 1700.0000000, -1860.3300000, 13.3320000, 0.05, 0.0, 0.0, 90);
SendClientMessage(playerid, COLOR_YELLOW, "Barrier opening.");
Gate[playerid]=1;
return 1;
}
else if(Gate[playerid]==1)
{
if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1700.0000000, -1860.2000000, 13.4000000)) return SendClientMessage(playerid, blue, "You are not close enough!");
MoveObject(Gate[7], 1700.0000000, -1860.2000000, 13.4000000, 0.05, 0.0, 270, 90);
SendClientMessage(playerid, COLOR_YELLOW, "Barrier closing.");
Gate[playerid]=0;
return 1;
}
return 1;
}
Re: HELP: waring 209:.... -
MikE1990 - 28.02.2016
Код:
//mechanic barrier
CMD:mpost(playerid, params[])
{
if(KasutajaInfo[playerid][Group] == 8 || KasutajaInfo[playerid][Admin] >= 2)
{
if(Gate[playerid]==0)
{
if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1700.0000000, -1860.2000000, 13.4000000)) return SendClientMessage(playerid, blue, "You are not close enough!");
MoveObject(Gate[7], 1700.0000000, -1860.3300000, 13.3320000, 0.05, 0.0, 0.0, 90);
SendClientMessage(playerid, COLOR_YELLOW, "Barrier opening.");
Gate[playerid]=1;
return 1;
}
else if(Gate[playerid]==1)
{
if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1700.0000000, -1860.2000000, 13.4000000)) return SendClientMessage(playerid, blue, "You are not close enough!");
MoveObject(Gate[7], 1700.0000000, -1860.2000000, 13.4000000, 0.05, 0.0, 270, 90);
SendClientMessage(playerid, COLOR_YELLOW, "Barrier closing.");
Gate[playerid]=0;
return 1;
}
}
return 1;
}
Re: HELP: waring 209:.... -
ZumFax - 28.02.2016
Its still same... and more
warning 209: function "cmd_mpost" should return a value
error 010: invalid function or declaration
Okei.. now i tried this way..
PHP код:
CMD:mpost(playerid, params[])
{
if(Gate[playerid]==0)
{
if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1700.0000000, -1860.2000000, 13.4000000)) return SendClientMessage(playerid, blue, "You are not close enough!");
if(KasutajaInfo[playerid][[Group] == 8 || KasutajaInfo[playerid][Admin] >= 2)
MoveObject(Gate[7], 1700.0000000, -1860.3300000, 13.3320000, 0.05, 0.0, 0.0, 90);
SendClientMessage(playerid, COLOR_YELLOW, "Barrier opening.");
Gate[playerid]=1;
}
else if(Gate[playerid]==1)
{
MoveObject(Gate[7], 1700.0000000, -1860.2000000, 13.4000000, 0.05, 0.0, 270, 90);
SendClientMessage(playerid, COLOR_YELLOW, "Barrier closing.");
Gate[playerid]=0;
}
else KasutusText(playerid, "You do not have remote");
return 1;
}
It works but "You do not have remote" do not work :/
can anyone give me some links or tell me how do I get it work