25.05.2016, 09:53
Quote:
CMD:acceptinvite(playerid, params[]) { new facid, string[128];//creates a faction id and some text on the players screen facid = GetPVarInt(playerid, "invitefac");//calls the saved invite from the previous command PlayerInfo[playerid][pFaction] = facid; //sets the players faction to that of the person inviting. PlayerInfo[playerid][pFacrank] = 1;//sets the players faction rank to 1 format(string, sizeof(string), "> You have accepted the invite to faction %d", facid);//tells the player they have accepted the faction invite SendClientMessage(playerid, COLOR_CYAN, string);//shows the above message in the color of CYAN DeletePVar(playerid, "invitefac");//deletes the saved invite return 1; } |
Quote:
//Under the command if(facid<0) return SendClientMessage(playerid, color,"You have not been invited to any faction."); |