Marrige system help
#1

So i wanted to make a marrige system for my server but now got it so far and thought that i have made a mistake. Cuz im willing to make it based on dialogs and with one checkpoint. So if the bouth genders are in the checkpoint they could marry each other. + I dont know how to make the rest part of command ;/

PHP код:
CMD:marry (playeridparams[])
{
    new 
string [128]; pMarriedpGenderplayerb;
    if(!
IsPlayerLoggedIn(playerid)) return SendClientMessage(playeridCOLOR_GREY"You need to login first before using any command.");
    if(
PlayerInfo[playerid][pMarried] < 1) return SendClientMessage(playeridCOLOR_GREY"You are already married.");
    if(!
IsPlayerInRangeOfPoint(playerid42117.5835,-1153.0809,24.2201)) return SendClientMessage(playeridCOLOR_GREY"You are not at the wedding chapell.");
    if(
PlayerInfo[playerb][pGender] == 1)(IsInRangeOfPoint(playerid4,2117.5835,-1153.0809,24.2201));
    if(
PlayerInfo[playerb][pGender] == 2)(IsInRangeOfPoint(playerid4,2117.5835,-1153.0809,24.2201));
    {
    
ShowPlayerDialog(playerid0DIALOG_STYLE_MSGBOX"Partner","Will you marry me?""Yes""No");
    } 
Reply
#2

pawn Код:
CMD:marry(playerid, params[])
{
    new string [128], playerb;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pMarried] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are already married.");
    if(!IsPlayerInRangeOfPoint(playerid, 4, 2117.5835,-1153.0809,24.2201)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the wedding chapell.");
    if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, -1, "Usage: /marry [playerid]");
    if(PlayerInfo[playerid][pGender] == 1 && IsInRangeOfPoint(playerid, 4,2117.5835,-1153.0809,24.2201) && PlayerInfo[playerb][pGender] == 2 && IsInRangeOfPoint(playerb, 4,2117.5835,-1153.0809,24.2201));
    {
       ShowPlayerDialog(playerb, 0, DIALOG_STYLE_MSGBOX, "Partner","Will you marry me?", "Yes", "No");
    }  
    else SendClientMessage(playerid, -1, "Your partner is not in range of point or he has the same Gender.");
    return 1;
}
I think, you have an enum.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)