Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Sistem de haine
- by Gireada
- Don't remove the credits. Nu stergeti creditele.
- Contact:gireada09(skype,messenger,live)
- */
- #include <a_samp>
- #include <dini>
- #include <zcmd>
- new cloth[MAX_PLAYERS];
- new changecloth[MAX_PLAYERS];
- new Gnextskin[MAX_PLAYERS];
- new PlayerText:Gireada0[MAX_PLAYERS];
- new PlayerText:Gireada1[MAX_PLAYERS];
- new PlayerText:Gireada2[MAX_PLAYERS];
- new PlayerText:Gireada3[MAX_PLAYERS];
- new PlayerText:Gireada4[MAX_PLAYERS];
- new PlayerText:Gireada5[MAX_PLAYERS];
- enum PlayerData
- {
- pSkin,
- }
- new PlayerInfo[MAX_PLAYERS][PlayerData];
- stock pName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- return name;
- }
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Sistem de haine by Gireada");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- main()
- {
- print("\n----------------------------------");
- print(" Sistem de haine by Gireada");
- print("----------------------------------\n");
- }
- public OnPlayerConnect(playerid)
- {
- new file[30];
- format(file, sizeof(file),"JucatoriSkin/%s.ini", pName(playerid));
- if(dini_Exists(file))
- {
- PlayerInfo[playerid][pSkin] = dini_Int(file,"Skin");
- }
- else if(!dini_Exists(file))
- {
- dini_Create(file);
- dini_IntSet(file,"Skin",PlayerInfo[playerid][pSkin] = 0);
- }
- cloth[playerid] = 0;
- Gireada0[playerid] = CreatePlayerTextDraw(playerid, 199.500000, 204.312500, "Prev");
- PlayerTextDrawLetterSize(playerid, Gireada0[playerid], 0.449999, 1.600000);
- PlayerTextDrawAlignment(playerid, Gireada0[playerid], 1);
- PlayerTextDrawColor(playerid, Gireada0[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Gireada0[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Gireada0[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Gireada0[playerid], 51);
- PlayerTextDrawFont(playerid, Gireada0[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Gireada0[playerid], 1);
- PlayerTextDrawSetSelectable(playerid, Gireada0[playerid], true);
- Gireada1[playerid] = CreatePlayerTextDraw(playerid, 260.000000, 189.625000, "usebox");
- PlayerTextDrawLetterSize(playerid, Gireada1[playerid], 0.000000, 4.787499);
- PlayerTextDrawTextSize(playerid, Gireada1[playerid], 178.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, Gireada1[playerid], 1);
- PlayerTextDrawColor(playerid, Gireada1[playerid], 0);
- PlayerTextDrawUseBox(playerid, Gireada1[playerid], true);
- PlayerTextDrawBoxColor(playerid, Gireada1[playerid], 102);
- PlayerTextDrawSetShadow(playerid, Gireada1[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Gireada1[playerid], 0);
- PlayerTextDrawFont(playerid, Gireada1[playerid], 0);
- Gireada2[playerid] = CreatePlayerTextDraw(playerid, 392.500000, 201.250000, "Next");
- PlayerTextDrawLetterSize(playerid, Gireada2[playerid], 0.449999, 1.600000);
- PlayerTextDrawAlignment(playerid, Gireada2[playerid], 1);
- PlayerTextDrawColor(playerid, Gireada2[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Gireada2[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Gireada2[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Gireada2[playerid], 51);
- PlayerTextDrawFont(playerid, Gireada2[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Gireada2[playerid], 1);
- PlayerTextDrawSetSelectable(playerid, Gireada2[playerid], true);
- Gireada3[playerid] = CreatePlayerTextDraw(playerid, 461.000000, 185.687500, "usebox");
- PlayerTextDrawLetterSize(playerid, Gireada3[playerid], 0.000000, 5.127777);
- PlayerTextDrawTextSize(playerid, Gireada3[playerid], 372.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, Gireada3[playerid], 1);
- PlayerTextDrawColor(playerid, Gireada3[playerid], 0);
- PlayerTextDrawUseBox(playerid, Gireada3[playerid], true);
- PlayerTextDrawBoxColor(playerid, Gireada3[playerid], 102);
- PlayerTextDrawSetShadow(playerid, Gireada3[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Gireada3[playerid], 0);
- PlayerTextDrawFont(playerid, Gireada3[playerid], 0);
- Gireada4[playerid] = CreatePlayerTextDraw(playerid, 305.000000, 332.062500, "Done");
- PlayerTextDrawLetterSize(playerid, Gireada4[playerid], 0.449999, 1.600000);
- PlayerTextDrawAlignment(playerid, Gireada4[playerid], 1);
- PlayerTextDrawColor(playerid, Gireada4[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Gireada4[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Gireada4[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Gireada4[playerid], 51);
- PlayerTextDrawFont(playerid, Gireada4[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Gireada4[playerid], 1);
- PlayerTextDrawSetSelectable(playerid, Gireada4[playerid], true);
- Gireada5[playerid] = CreatePlayerTextDraw(playerid, 362.500000, 322.187500, "usebox");
- PlayerTextDrawLetterSize(playerid, Gireada5[playerid], 0.000000, 4.398611);
- PlayerTextDrawTextSize(playerid, Gireada5[playerid], 285.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, Gireada5[playerid], 1);
- PlayerTextDrawColor(playerid, Gireada5[playerid], 0);
- PlayerTextDrawUseBox(playerid, Gireada5[playerid], true);
- PlayerTextDrawBoxColor(playerid, Gireada5[playerid], 102);
- PlayerTextDrawSetShadow(playerid, Gireada5[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Gireada5[playerid], 0);
- PlayerTextDrawFont(playerid, Gireada5[playerid], 0);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new file[30];
- cloth[playerid] = 0;
- format(file, sizeof(file),"JucatoriSkin/%s.ini", pName(playerid));
- dini_IntSet(file,"Skin",PlayerInfo[playerid][pSkin]);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
- return 1;
- }
- CMD:skin(playerid, params[])
- {
- if(changecloth[playerid] == 0)
- {
- changecloth[playerid] = 1;
- SetPlayerPos(playerid,403.9533,2440.8496,16.4953); SetPlayerFacingAngle( playerid, 7.0964);
- SetPlayerCameraPos(playerid, 404.3037, 2446.9883, 17.3881);
- SetPlayerCameraLookAt(playerid, 404.2586, 2445.9846, 17.2731);
- Gnextskin[playerid] = 0;SelectTextDraw(playerid, 0x00FF00FF); TogglePlayerControllable(playerid,0);
- PlayerTextDrawShow(playerid, Gireada0[playerid]);
- PlayerTextDrawShow(playerid, Gireada1[playerid]);
- PlayerTextDrawShow(playerid, Gireada2[playerid]);
- PlayerTextDrawShow(playerid, Gireada3[playerid]);
- PlayerTextDrawShow(playerid, Gireada4[playerid]);
- PlayerTextDrawShow(playerid, Gireada5[playerid]);
- }
- else
- {
- SendClientMessage(playerid, 0xFFFFFFAA, "Iti alegi deja hainele.");
- }
- return 1;
- }
- public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
- {
- if(playertextid == Gireada0[playerid])
- {
- Gnextskin[playerid] -= 1;SetPlayerSkin(playerid, Gnextskin[playerid]);
- if(Gnextskin[playerid] == 0)
- {
- Gnextskin[playerid] = 299;SetPlayerSkin(playerid, Gnextskin[playerid]);
- }
- }
- if(playertextid == Gireada2[playerid])
- {
- Gnextskin[playerid] += 1;SetPlayerSkin(playerid, Gnextskin[playerid]);
- if(Gnextskin[playerid] == 299)
- {
- Gnextskin[playerid] = 1;SetPlayerSkin(playerid, Gnextskin[playerid]);
- }
- }
- if(playertextid == Gireada4[playerid])
- {
- SendClientMessage(playerid, 0xFFFFFFAA, "Felicitari pentru hainele alese. Tea costat 50$");
- GivePlayerMoney(playerid, -50);
- PlayerInfo[playerid][pSkin] = Gnextskin[playerid];
- CancelSelectTextDraw(playerid);changecloth[playerid] = 0;
- SetPlayerInterior(playerid, 0); SetCameraBehindPlayer(playerid);
- PlayerTextDrawHide(playerid, Gireada0[playerid]);
- PlayerTextDrawHide(playerid, Gireada1[playerid]);
- PlayerTextDrawHide(playerid, Gireada2[playerid]);
- PlayerTextDrawHide(playerid, Gireada3[playerid]);
- PlayerTextDrawHide(playerid, Gireada4[playerid]);
- PlayerTextDrawHide(playerid, Gireada5[playerid]);
- TogglePlayerControllable(playerid,1);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement