Marrige system help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Marrige system help (
/showthread.php?tid=539779)
Marrige system help -
weedxd - 30.09.2014
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 (playerid, params[])
{
new string [128]; pMarried, pGender, 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(PlayerInfo[playerb][pGender] == 1)(IsInRangeOfPoint(playerid, 4,2117.5835,-1153.0809,24.2201));
if(PlayerInfo[playerb][pGender] == 2)(IsInRangeOfPoint(playerid, 4,2117.5835,-1153.0809,24.2201));
{
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Partner","Will you marry me?", "Yes", "No");
}
Re : Marrige system help -
streetpeace - 30.09.2014
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.