28.02.2016, 18:31
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;
}