SA-MP Forums Archive
Marriage System - 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: Marriage System (/showthread.php?tid=336066)



Marriage System - RollTi - 21.04.2012

Ok so i'm going to use OnPlayerText for the following

• if the man or woman type /marry [playerid] the man or woman will ask

Will You Marry me, PlayerName?

So now i will set InMarriage to 1 and will use OnPlayerText but how to do this?

Код:
PlayerName accept your married request!

or

PlayerName decline your married request!
i know i will use strcmp or strmid but how do i sent that message to the man/woman who request for married?


Re: Marriage System - ReneG - 21.04.2012

Under OnPlayerText
pawn Код:
if(InMarriage[playerid] == 1 && strcmp("yes",text,true) == 0)
{
    // code here
    return 1;
}



Re: Marriage System - RollTi - 21.04.2012

Yes i know but how could i sent the message to the marry requester?

Ex.

i'm about to type /marry 9 so i'm the marry requester

then in id 9 screen is

pawn Код:
Will you Marry me, PlayerName?
so if she say Yes or No it will sent to me how to do that


Re: Marriage System - RollTi - 21.04.2012

Quote:
Originally Posted by RollTi
Посмотреть сообщение
Yes i know but how could i sent the message to the marry requester?

Ex.

i'm about to type /marry 9 so i'm the marry requester

then in id 9 screen is

pawn Код:
Will you Marry me, PlayerName?
so if she say Yes or No it will sent to me how to do that
Up Up!


Re: Marriage System - ReneG - 21.04.2012

You do this by using format, and GetPlayerName.


Re: Marriage System - RollTi - 21.04.2012

Never mind i use /marryaccept instead of OnPlayerText

rep+ for you vincentdunn


Re: Marriage System - RollTi - 21.04.2012

one more question

Ex.

if i'm male and the id i put in /marry is male i should get

pawn Код:
You cannot marry male to male!
or

pawn Код:
You cannot marry female to female!
i already have Gender system which is this

pawn Код:
pInfo[playerid][Gender]



Re: Marriage System - ReneG - 21.04.2012

pawn Код:
if(pInfo[playerid][Gender] == pInfo[id][Gender])
{
    return SendClientMessage(playerid, -1, "You cannot marry someone the same gender as you!");
}