Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*******************************************************************************
- Solltest du ein Filterscript erstellen, so schreibe unten bei Define über dem
- #if defined FILTERSCRIPT einfach folgendes:
- #define FILTERSCRIPT
- Falls es ein Gamemode wird, so schreibe es nicht dort hin!
- Scriptname: -
- Version: -
- Kategorie: -
- Inhalt: -
- Beschreibung: -
- *******************************************************************************/
- //Include
- #include <a_samp>
- //Define
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- #define DIALOG_VOTEADM 5000
- #define DIALOG_VOTEUSR 5001 // Zahlen bitte entsprechend ändern
- #define DIALOG_VOTEANZ 5002
- #define DIALOG_VSTATS 5003
- #define DIALOG_VBUTTONONE 5004
- #define DIALOG_VBUTTONTWO 5005
- //New
- new countja;
- new countnein;
- new itstring[128] = "Keine Frage vorhanden.";
- new buttonone[128] = "None";
- new buttontwo[128] = "None";
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Votingsystem by Sonderzeichen started");
- print("--------------------------------------\n");
- return 1;
- }
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" Votingsystem by Sonderzeichen stopped");
- print("--------------------------------------\n");
- return 1;
- }
- #else
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- public OnGameModeInit()
- {
- return 1;
- }
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- public OnGameModeExit()
- {
- return 1;
- }
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- 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("/cvote", cmdtext, true, 10) == 0)
- {
- countja = 0;
- countnein = 0;
- ShowPlayerDialog(playerid, DIALOG_VOTEADM, DIALOG_STYLE_INPUT, "[VS] Frage eingeben", "Bitte geben Sie die Frage ein.\nDie Beschriftung der beiden Antwortbuttons können Sie gleich festlegen.", "Ok", "Abbr.");
- return 1;
- }
- if (strcmp("/vote", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_VOTEUSR, DIALOG_STYLE_MSGBOX,"[VS] Votesystem", itstring, buttonone, buttontwo);
- return 1;
- }
- if (strcmp("/vstats", cmdtext, true, 10) == 0)
- {
- new string[64];
- format(string, sizeof(string), "Frage: %s\n%s: %d\n%s: %d", itstring, buttonone, countja, buttontwo, countnein);
- ShowPlayerDialog(playerid, DIALOG_VSTATS, DIALOG_STYLE_MSGBOX, "[VS] Statisktik", string, "Ok", "Abbr.");
- return 1;
- }
- return 0;
- }
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- 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[])
- {
- if(dialogid == DIALOG_VOTEADM)
- {
- if(response == 1)
- {
- format(itstring, sizeof(itstring), "%s", inputtext);
- ShowPlayerDialog(playerid, DIALOG_VBUTTONONE, DIALOG_STYLE_INPUT, "[VS] Beschriftung vom ersten Button", "Bitte legen Sie die Beschriftung vom ersten Button fest.", "Ok", "Abbr.");
- }
- }
- if(dialogid == DIALOG_VBUTTONONE)
- {
- if(response == 1)
- {
- new string[128];
- format(string, sizeof(string), "%s", inputtext);
- buttonone = string;
- ShowPlayerDialog(playerid, DIALOG_VBUTTONTWO, DIALOG_STYLE_INPUT, "[VS] Beschriftung vom zweiten Button", "Bitte legen Sie die Beschriftung vom zweiten Button fest.", "Ok", "Abbr.");
- }
- }
- if(dialogid == DIALOG_VBUTTONTWO)
- {
- if(response == 1)
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- new string[128];
- format(string, sizeof(string), "%s", inputtext);
- buttontwo = string;
- ShowPlayerDialog(i, DIALOG_VOTEUSR, DIALOG_STYLE_MSGBOX, "[VS] Votesystem", itstring, buttonone, buttontwo);
- }
- }
- }
- if(dialogid == DIALOG_VOTEUSR)
- {
- if(response == 0)
- {
- countnein +=1;
- }
- if(response == 1)
- {
- countja +=1;
- }
- }
- return 1;
- }
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement