cmd_afk should return a value
#1

[B]I know this a really easy question but i do not know how to fix this! please help.[

The Title says the error i get when i compile./B]

pawn Код:
CMD:afk(playerid,params[])
{
   new str[144];
   new afkname[144];
   new Float:health;
   new Float:x, Float:y, Float:z;
   GetPlayerName(playerid,afkname,sizeof(afkname));
   GetPlayerHealth(playerid,health);
   if (health < 70.0) return SendClientMessage(playerid,0xE6421AC8,"{11EEC1}» {FF0000}You need atleast 70 HP to go afk.");
    format(str,sizeof(str),"{FFFFFF}%s[%d] 0xFF1A00C8has went on AFK-MODE. ",afkname,playerid);
    SendClientMessage(playerid,-1,str);
   GetPlayerPos(playerid, x, y, z);
   SetPlayerPos(playerid,264.4454,77.4404,1001.0391);
   SetPlayerFacingAngle(playerid,273.0648);
   SetPlayerInterior(playerid,6);
   SetCameraBehindPlayer(playerid);
   TogglePlayerControllable(playerid,0);
    }
     else  // So when they type it again there off AFK
        {
            SendClientMessage(playerid,0x15EAEAC8,"You Are Now OFF AFK Mode");
            SetPlayerPos(playerid,x,y,z);
            TogglePlayerControllable(playerid,1);
            SetPlayerHealth(playerid,health);
            SetPlayerInterior(playerid,0);
            }
              return 1;
      }
Reply


Messages In This Thread
cmd_afk should return a value - by [Cali]ChrOnic_T - 20.06.2014, 23:50
AW: cmd_afk should return a value - by rospar - 21.06.2014, 00:00

Forum Jump:


Users browsing this thread: 1 Guest(s)