24.03.2013, 14:24
/pickup
Код:
CMD:pickup(playerid, params[]) { new string[256]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(!PlayerInfo[playerid][pHasCellphone]) return SendClientMessage(playerid, COLOR_GREY, "You don't own a cellphone."); if(!BeingCalled[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Nobody is caling you."); format(string, sizeof(string), "* %s answers his cellphone.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); SendClientMessage(playerid, COLOR_ORANGE, " You have picked up the line."); SendClientMessage(Caller[playerid], COLOR_ORANGE, " They pickedup the line."); Calling[Caller[playerid]] = 2; BeingCalled[playerid] = 2; SetTimerEx("PhoneCall", 1000, false, "d", Caller[playerid]); return 1; }