Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /****************************************************************************************************************************************************************************
- *****************************************************************************************************************************************************************************
- *****************************************************************************************************************************************************************************
- ***********************************************************************__________________************************************************************************************
- **********************************************************************| Hold System |***********************************************************************************
- **********************************************************************| |***********************************************************************************
- **********************************************************************| By |***********************************************************************************
- **********************************************************************| Gireada |***********************************************************************************
- **********************************************************************| |***********************************************************************************
- **********************************************************************| |***********************************************************************************
- **********************************************************************| |***********************************************************************************
- **********************************************************************| |***********************************************************************************
- **********************************************************************| |***********************************************************************************
- **********************************************************************---------------------************************************************************************************
- */
- //Nu stergeti Creditele.
- #include <a_samp>
- #include <zcmd>
- #define Dialog_Hold 55
- #define Dialog_Hold2 56
- #define Dialog_Hold3 57
- #define Dialog_Hold4 58
- #define Dialog_Hold5 59
- #define Dialog_Hold6 60
- new ObiectAles[MAX_PLAYERS];
- new Slot[MAX_PLAYERS];
- new Corp[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Hold Sistem by Gireada");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- main()
- {
- print("\n----------------------------------");
- print(" Hold Sistem by Gireada");
- print("----------------------------------\n");
- }
- CMD:hold(playerid, params[])
- {
- ShowPlayerDialog(playerid, Dialog_Hold, DIALOG_STYLE_LIST, "{00FB29}Hold", "Creeaza Hold\nEdit Hold", "Accept", "Anulesz");
- 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("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- 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[])
- {
- new string[256], string2[1024];
- if(response)
- {
- switch(dialogid)
- {
- case Dialog_Hold:
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, Dialog_Hold2, DIALOG_STYLE_LIST, "{00FB29}Hold", "{FFFFFF}Introdu ID", "Accept", "Anulez");
- }
- case 1:
- {
- for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, i))
- {
- format(string, sizeof(string), "{FFFFFF}Slot: {009AFB}%d {FFFFFF}| {FB0000}Folosit\n",i);
- strcat(string2, string);
- }
- else if(!(IsPlayerAttachedObjectSlotUsed(playerid, i)))
- {
- format(string, sizeof(string), "{FFFFFF}Slot: {009AFB}%d {FFFFFF}| {00FB29}Gol\n",i);
- strcat(string2, string);
- }
- }
- ShowPlayerDialog(playerid, Dialog_Hold3, DIALOG_STYLE_LIST, "{00FB29}Hold", string2, "Accept", "Anulesz");
- }
- }
- }
- case Dialog_Hold2:
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid,Dialog_Hold4, DIALOG_STYLE_INPUT, "{00FB29}Hold", "{FFFFFF}Introdu ID-ul obiectului", "Accept", "Anulez");
- }
- }
- }
- case Dialog_Hold3:
- {
- if(!(IsPlayerAttachedObjectSlotUsed(playerid, listitem)))
- {
- for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, i))
- {
- format(string, sizeof(string), "{FFFFFF}Slot: {009AFB}%d {FFFFFF}| {FB0000}Folosit\n",i);
- strcat(string2, string);
- }
- else if(!(IsPlayerAttachedObjectSlotUsed(playerid, i)))
- {
- format(string, sizeof(string), "{FFFFFF}Slot: {009AFB}%d {FFFFFF}| {00FB29}Gol\n",i);
- strcat(string2, string);
- }
- }
- ShowPlayerDialog(playerid, Dialog_Hold3, DIALOG_STYLE_LIST, "{00FB29}Hold", string2, "Accept", "Anulesz");
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid, listitem))
- {
- EditAttachedObject(playerid, listitem);
- }
- }
- case Dialog_Hold4:
- {
- if(!(strval(inputtext) > 999 || strval(inputtext) < 19522))
- {
- ShowPlayerDialog(playerid,Dialog_Hold4, DIALOG_STYLE_INPUT, "{00FB29}Hold", "{FFFFFF}Introdu ID-ul obiectului", "Accept", "Anulez");
- SendClientMessage(playerid, 0xFFFFFFFF, "Introdu un numar intre 1000 si 19521");
- }
- ObiectAles[playerid] = strval(inputtext);
- for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, i))
- {
- format(string, sizeof(string), "{FFFFFF}Slot: {009AFB}%d {FFFFFF}| {FB0000}Folosit\n",i);
- strcat(string2, string);
- }
- else if(!(IsPlayerAttachedObjectSlotUsed(playerid, i)))
- {
- format(string, sizeof(string), "{FFFFFF}Slot: {009AFB}%d {FFFFFF}| {00FB29}Gol\n",i);
- strcat(string2, string);
- }
- }
- ShowPlayerDialog(playerid, Dialog_Hold5, DIALOG_STYLE_LIST, "{00FB29}Alege un Slot", string2, "Accept", "Anulesz");
- }
- case Dialog_Hold5:
- {
- Slot[playerid] = listitem;
- strcat(string2, "{FC0202}Spate\n{FC6202}Cap\n{FCC302}Umarul Stang\n{F7FF09}Umarul Drept\n{D6FF09}Mana Stanga\n{A0FF09}Mana Dreapta\n{5FFF09}Coapsa Stanga\n{0BFF8D}Coapsa Dreapta\n{0BFFFB}Picorulu Stang\n");
- strcat(string2, "{0BC7FF}Piciorul Drept\n{0B8DFF}Gamba Stanga\n{0B45FF}Gamba Dreapta\n{9E52FB}Brat Stang\n{EE74FF}Brat Drept\n{FF00FB}Shouldul Stang\n{FF00C8}Shouldul Drept\n{FF0084}Gat\n{FF0000}Obraz");
- ShowPlayerDialog(playerid, Dialog_Hold6, DIALOG_STYLE_LIST, "{00FB29}Alege o parte", string2, "Accept", "Anulesz");
- }
- case Dialog_Hold6:
- {
- Corp[playerid] = listitem+1;
- SetPlayerAttachedObject(playerid, Slot[playerid], ObiectAles[playerid], Corp[playerid]);
- EditAttachedObject(playerid, Slot[playerid]);
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement