19.11.2010, 17:38
Will i have a Problem with my /AFK command I can show what happend
I Get this Warning When i hit complie: C:\Users\me\Desktop\New folder2\gamemodes\CR.pwn(7521) : warning 209: function "dcmd_afk" should return a value
Well here is the command
I Get this Warning When i hit complie: C:\Users\me\Desktop\New folder2\gamemodes\CR.pwn(7521) : warning 209: function "dcmd_afk" should return a value
Well here is the command
Код:
dcmd_afk(playerid,params[]) { #pragma unused params if(PlayerInfo[playerid][Jailed] || PlayerInfo[playerid][IsTazed] || PlayerInfo[playerid][IsCuffed] || PlayerInfo[playerid][Kidnapped] || PlayerInfo[playerid][IsTied]) return SendClientMessage(playerid,red,"You can't do that at this time!"); if(PlayerInfo[playerid][IsAfk] == 0) { new string[128]; GetPlayerPos(playerid,aX[playerid],aY[playerid],aZ[playerid]); SetPlayerPos(playerid,aX[playerid],aY[playerid],aZ[playerid]+400); TogglePlayerControllable(playerid,0); AfkColor[playerid] = GetPlayerColor(playerid); SetPlayerColor(playerid,COLOR_DEAD); format(string,sizeof(string),"%s(%d) is now in state Away From Keyboard (/AFK)",PlayerName(playerid),playerid); SendClientMessageToAll(COLOR_WHITE,string); SendClientMessage(playerid,red,"To get away from AFK state, use /afkoff"); PlayerInfo[playerid][IsAfk] = 1; } else SendClientMessage(playerid,red,"You are already AFK, use /afkoff to set it off"); return; }