kann wer mein script hier korregieren , und hinzufügen das wenn man in den /stats ... [ehepartner change und so wenn man sich heiratet :),
hier ist das script:
#include <a_samp>
#include <ocmd>
#include <sscanf2>
//Dialoge defeniert:
#define DIALOG_HOCHZEIT 1
//ein paar farben defeniert!
#define BLUE 0xFF2463D7
#define GREY 0xFF888686
#define GREEN 0xFF16C924
#define RED 0xFFD70005
#define ORANGE 0xFFF7972D
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("SelfMAde Script ");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print("Self MAde script!");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
SetGameModeText("Jeffs Script");
AddPlayerClass(0,2641.4780,-2003.4609,13.5547,277.4488,0,0,0,0,0,0);
AddPlayerClass(188,2641.4780,-2003.4609,13.5547,277.4488,0,0,0,0,0,0);
//NPC`s Connected//
ConnectNPC("TaxiFahrer1","TaxiPort");//taxi fahrer npc 1
ConnectNPC("TaxiFahrer2","TaxiPort");//taxi fahrer npc 2
ConnectNPC("TaxiFahrer3","TaxiPort");//taxi fahrer npc 3
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 2641.4780,-2003.4609,13.5547);
SetPlayerCameraPos(playerid, 2641.4780,-2003.4609,13.5547);
SetPlayerCameraLookAt(playerid, 2641.4780,-2003.4609,13.5547);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/stats", cmdtext, true, 10) == 0)
{
new string[128];
format(string,sizeof(string),"[EhePartner: %s]",getName(playerid));
SendClientMessage(playerid,BLUE,string);
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
ChangeVehicleColor( 438, 166, 166);
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128];
if(dialogid == DIALOG_HOCHZEIT)
{
if(response == 0)
{
format(string,sizeof(string),"%s und %s sind nun Verheiratet!",getName(playerid,getName(pID));
SendClientMessageToAll(ORANGE,string);
SendClientMessageToAll(ORANGE,"Herzlichen Glückwunsch ihr beiden");
}
if(response == 1)
{
format(string,sizeof(string),"%s hat den Hochzeits Antrag Abgelehnt!",getName(playerid,getName(pID));
SendClientMessage(playerid,RED,string);
SendClientMessage(playerid,RED,"Du hast 5000$ verloren!");
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
stock getName(id)
{
GetPlayerName(id,GetNamee,sizeof(GetNamee));
return GetNamee;
}
ocmd:heiraten(playerid,params[])
{
new pID;
if(sscanf(params,"u",pID))return SendClientMessage(playerid,GREY,"/Heiraten [Playerid]");
{
new string[128];
if(IsPlayerConnected(pID))
{
GivePlayerMoney(playerid,-5000);
SendClientMessage(playerid,GREEN,"Du hast erfolgreich den Antrag gestellt");
format(string,sizeof(string),"%s hat dir ein Hochzeits Antrag Gestellt!", getName(playerid));
SendClientMessage(pID,GREEN,string);
format(string,sizeof(string),"%s hat dir ein Hochzeits-Antrag gestellt\nmit JA kannst du es Anehmen!\nund mit NEIN kannst du es Ablehnen!", getName(playerid));
ShowPlayerDialog(pID,DIALOG_HOCHZEIT,DIALOG_STYLE_MSGBOX,"Du hast ein Hochzeits Antrag erhalten!",string,"JA","NEIN");
}
else SendClientMessage(playerid,RED,"Sie/Er ist zurzeit nicht online!");
return 1;
}
}
Bin dankbar an alle die mein Script durchgehen und es korregieren oder überhaupt es durchgehen oder ein beitrag posten!
danke:)