View difference between Paste ID: Zq9uH8P6 and iFjFpFFR
SHOW: | | - or go back to the newest paste.
1
// This is a comment
2
// uncomment the line below if you want to write a filterscript
3
//define filterscript
4
5
#include <core>
6
#include <float>
7
#include <a_samp>
8
#include <zcmd>
9
#pragma tabsize 0
10
11
main ()
12
{
13
}
14
15
#define COLOR_WHITE 0xFFFFFFFF
16
#define COL_GREEN          "{6EF83C}"
17
#define COL_WHITE          "{FFFFFF}"
18
#define COLOR_RED          0xAA3333AA
19
#define COLOR_GREEN        0x33AA33AA
20
#define GROVE 1
21
#define BALLA 2
22
#define AZTECAS 3
23
#define AMMUNITION 4
24
#define SLUT 5
25
#define BOSS 6
26
#define VAGOS 7
27
#define DIALOG_TEAM 123
28
29
new gPlayerTeam[MAX_PLAYERS];
30
new gPlayerClass[MAX_PLAYERS];
31
new PickedClass[MAX_PLAYERS];
32
33
public OnGameModeInit()
34
{
35
    // Don't use these lines if it's a filterscript
36
    SetGameModeText("Just Testin'");
37
    AddPlayerClass(107,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
38
    AddPlayerClass(106,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
39
    AddPlayerClass(105,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
40
    AddPlayerClass(108,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
41
    AddPlayerClass(109,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
42
    AddPlayerClass(110,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
43
    AddPlayerClass(102,2521.2722,-1678.7083,15.3522,82.8959,22,9999,31,999,30,999);
44
    AddPlayerClass(103,2521.2722,-1678.7083,15.3522,82.8959,27,2700,22,9999,31,999);
45
    AddPlayerClass(104,2521.2722,-1678.7083,15.3522,82.8959,27,2700,22,9999,31,999);
46
    AddPlayerClass(114,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
47
    AddPlayerClass(115,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
48
    AddPlayerClass(116,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
49
    AddPlayerClass(120,2521.2722,-1678.7083,15.3522,82.8959,8,0,31,999,24,999);
50
    AddPlayerClass(179,2521.2722,-1678.7083,15.3522,82.8959,30,500,22,490,29,800);
51
    AddPlayerClass(194,2521.2722,-1678.7083,15.3522,82.8959,10,0,31,2000,30,2000);
52
53
    AddStaticVehicle(447,2529.5759,-1678.2296,19.9419,91.5106,75,2);
54
    AddStaticVehicle(490,2494.3008,-1654.5840,13.5311,249.8709,0,0);
55
    AddStaticVehicle(451,2473.8311,-1700.7242,13.2273,177.6675,125,125);
56
    AddStaticVehicle(522,2528.0742,-1689.7404,13.2581,80.6985,6,25);
57
    AddStaticVehicle(522,2527.1887,-1689.2676,13.2201,63.1784,6,25);
58
    return 1;
59
}
60
61
public OnGameModeExit()
62
{
63
    return 1;
64
}
65
66
public OnPlayerRequestClass(playerid, classid)
67
{
68
    if(gPlayerTeam[playerid] == -1)
69
    {
70
        TogglePlayerSpectating(playerid, 1);
71
        ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Grove Class\nBalla Class\nVagos Class\nAztecas Class\nSlut Class\nAmmunution class\nBoss Class", "Choose","");
72
        return 0;
73
    }
74
    else
75
    {
76
        SetPlayerPos(playerid,2519.8140,-1678.8607,14.8426);
77
        SetPlayerFacingAngle(playerid,63.1557);
78
        SetPlayerCameraPos(playerid,2513.6995,-1675.4047,13.5563);
79
        SetPlayerCameraLookAt(playerid,2519.8140,-1678.8607,14.8426);
80
        return 1;
81
    }
82
}
83
84
public OnPlayerConnect(playerid)
85
{
86
    gPlayerTeam[playerid] = -1;
87
    GameTextForPlayer(playerid, "Hello, Welcome to our server, remember to read /rules!",15000,6);
88
    return 1;
89
}
90
91
public OnPlayerDisconnect(playerid, reason)
92
{
93
    return 1;
94
}
95
96
public OnPlayerSpawn(playerid)
97
{
98
    if(gPlayerClass[playerid] == GROVE)
99
    {
100-
        TogglePlayerControllable(playerid, 1);
100+
	    SetPlayerSkin(playerid, 0);
101-
        ResetPlayerWeapons(playerid);
101+
102
        GivePlayerWeapon(playerid, 25, 1000);//mp5
103
        GivePlayerWeapon(playerid, 24, 7000);//deagle
104
    }
105
    else if(gPlayerClass[playerid] == BALLA)//This is for the Second Sniper class.
106
    {
107
	    SetPlayerSkin(playerid, 102);
108-
        TogglePlayerControllable(playerid, 1);
108+
109-
        ResetPlayerWeapons(playerid);
109+
110
        GivePlayerWeapon(playerid, 4, 1);//knife
111
    }
112
    else if(gPlayerClass[playerid] == AZTECAS)//This is for the Second Engineer class.
113
    {
114
115
	    SetPlayerSkin(playerid, 114);
116-
        TogglePlayerControllable(playerid, 1);
116+
117-
        ResetPlayerWeapons(playerid);
117+
118
        GivePlayerWeapon(playerid, 30, 2000);//rpg
119
        GivePlayerWeapon(playerid, 16, 5);//grenade
120
    }
121
    else if(gPlayerClass[playerid] == VAGOS)//This is for the Second Jetrooper class.
122
    {
123
124
	    SetPlayerSkin(playerid, 108);
125-
        TogglePlayerControllable(playerid, 1);
125+
126-
        ResetPlayerWeapons(playerid);
126+
127
        GivePlayerWeapon(playerid, 25, 200);//knife
128
    }
129
    else if(gPlayerClass[playerid] == SLUT)//This is for the Second Pilot class.
130
    {
131
132
	    SetPlayerSkin(playerid, 152);
133-
        TogglePlayerControllable(playerid, 1);
133+
134-
        ResetPlayerWeapons(playerid);
134+
135
        GivePlayerWeapon(playerid, 10, 1);//shotgun
136
    }
137
    else if(gPlayerClass[playerid] == AMMUNITION)//This is for the Second Spy class.
138
    {
139
140
	    SetPlayerSkin(playerid, 179);
141-
        TogglePlayerControllable(playerid, 1);
141+
142-
        ResetPlayerWeapons(playerid);
142+
143
        GivePlayerWeapon(playerid, 4, 1);//knife
144
        GivePlayerWeapon(playerid, 30, 500);//moltove
145
    }
146
    else if(gPlayerClass[playerid] == BOSS)//This is for the Second Spy class.
147
    {
148
	    SetPlayerSkin(playerid, 123);
149
        GivePlayerWeapon(playerid, 31, 990);//mp5
150-
        TogglePlayerControllable(playerid, 1);
150+
151-
        ResetPlayerWeapons(playerid);
151+
152
        GivePlayerWeapon(playerid, 32, 500);//moltove
153
    }
154
    return 1;
155
}
156
157
CMD:dildo(playerid,params[])
158
{
159
    if(gPlayerClass[playerid] == SLUT)//if the player is slut
160
    {
161
        SetPlayerHealth(playerid, 80);
162
    }
163
    return 1;
164
}
165
166
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
167
{
168
    if(dialogid == DIALOG_TEAM)
169
    {
170
        if(response)
171
        {
172
            gPlayerTeam[playerid] = listitem; // Set team ID
173
174
            TogglePlayerSpectating(playerid, 0); // Quit spectating -> Will send the player back to the class selection
175
            if(dialogid == 999)//dialog id response
176
            {
177
                if(response)
178
                {
179
                    if(listitem == 0)//the listitem0, defines the number one option of the dialog
180
                    {
181
                        if(GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
182
                        {
183
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Grove as your class.");
184
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Grove Class:", "{F81414}Abilities:\n{FFFFFF}Gang class. Good at shooting.\n\n{F81414}Weapons:\n\n{FFFFFF}M4\n{FFFFFF}Shotgun\n{FFFFFF}Deagle", "Play","");
185
                            gPlayerClass[playerid] = GROVE;//setting the class to soldier
186
                            PickedClass[playerid] = 1;
187
                            SetPlayerVirtualWorld(playerid, 0);
188
189
                            ResetPlayerWeapons(playerid);
190
                            GivePlayerWeapon(playerid, 31, 1000);//m4
191-
                            TogglePlayerControllable(playerid, 1);
191+
192
                            GivePlayerWeapon(playerid, 24, 7000);//deagle
193
                        }
194
                    }
195
196
                    if(listitem == 1)//the listitem1, defines the number one option of the dialog
197
                    {
198
                        if(GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
199
                        {
200
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Ballas as your class.");
201
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Ballas Class:", "{F81414}Abilities:\n{FFFFFF}You're invisible on map.You don't have much foes.Ammunition and slut are your friends.\n\n{F81414}Weapons:\n\n{FFFFFF}AK-47\n{FFFFFF}Mp5\n{FFFFFF}Knife", "Play","");
202
                            gPlayerClass[playerid] = BALLA;//setting the class to Sniper
203
                            PickedClass[playerid] = 1;
204
                            RemovePlayerMapIcon(playerid, 0);
205
                            SetPlayerVirtualWorld(playerid, 0);
206
207
                            ResetPlayerWeapons(playerid);
208
                            GivePlayerWeapon(playerid, 30, 2250);//sniper
209-
                            TogglePlayerControllable(playerid, 1);
209+
210
                            GivePlayerWeapon(playerid, 4, 1);//knife
211
                        }
212
                    }
213
214
                    if(listitem == 2)//the listitem2, defines the number one option of the dialog
215
                    {
216
                        if(GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
217
                        {
218
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Aztecas as your class.");
219
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Azteca Class:", "{F81414}Abilities:\n{FFFFFF}You fight against BALLAS and VAGOS. They are your only enemies..\n\n{F81414}Weapons:\n\n{FFFFFF}Spas12\n{FFFFFF}Silent Pistol\n{FFFFFF}M4\n{FFFFFF}Grenade", "Play","");
220
                            gPlayerClass[playerid] = AZTECAS;//setting the class to engineer
221
                            PickedClass[playerid] = 1;
222
                            SetPlayerVirtualWorld(playerid, 0);
223
                            ResetPlayerWeapons(playerid);
224
                            GivePlayerWeapon(playerid, 27, 700);//spas12
225
                            GivePlayerWeapon(playerid, 23, 8000);//silent pistol
226-
                            TogglePlayerControllable(playerid, 1);
226+
227
                            GivePlayerWeapon(playerid, 16, 5);//grenade
228
                        }
229
                    }
230
231
                    if(listitem == 3)//the listitem3, defines the number one option of the dialog
232
                    {
233
                        if(GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
234
                        {
235
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Vagos as your class.");
236
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Vagos Class:", "{F81414}Abilities:\n{FFFFFF}Good class if you want to go solo.\n\n{F81414}Weapons:\n\n{FFFFFF}Shotgun\n{FFFFFF}M4\n{FFFFFF}Mp5", "Play","");
237
                            gPlayerClass[playerid] = VAGOS;//setting the class to jettrooper
238
                            PickedClass[playerid] = 1;
239
                            SetPlayerVirtualWorld(playerid, 0);
240
                            ResetPlayerWeapons(playerid);
241
                            GivePlayerWeapon(playerid, 32, 500);//tec-9
242
                            GivePlayerWeapon(playerid, 30, 500);//colt
243
                            GivePlayerWeapon(playerid, 25, 200);//knife
244-
                            TogglePlayerControllable(playerid, 1);
244+
245
                    }
246
247
                    if(listitem == 4)//the listitem4, defines the number one option of the dialog
248
                    {
249
                        if(GetPlayerScore(playerid) >= 20)//if player have 0 score then  he can choose this class
250
                        {
251
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Slut as your class.");
252
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Slut Class:", "{F81414}Abilities:\n{FFFFFF}Best class: You can heal yourself with /dildo.\n\n{F81414}Weapons:\n\n{FFFFFF}Combat Shotgun\n{FFFFFF}Mp5\n{FFFFFF}Dildo", "Play","");
253
                            gPlayerClass[playerid] = SLUT;//setting the class to pilot
254
                            PickedClass[playerid] = 1;
255
                            SetPlayerVirtualWorld(playerid, 0);
256
                            ResetPlayerWeapons(playerid);
257
                            GivePlayerWeapon(playerid, 27, 10000);//deagle
258
                            GivePlayerWeapon(playerid, 29, 10000);//moltove
259
                            GivePlayerWeapon(playerid, 10, 1);//shotgun
260
                        }
261-
                            TogglePlayerControllable(playerid, 1);
261+
262
263
                    if(listitem == 5)//the listitem5, defines the number one option of the dialog
264
                    {
265
                        if(GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
266
                        {
267
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Ammunition as your class.");
268
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Ammunition Class:", "{F81414}Abilities:\n{FFFFFF}You sell weapons, do you really need a description? /dis\n\n{F81414}Weapons:\n\n{FFFFFF}Sawnoff\n{FFFFFF}Mp5\n{FFFFFF}Knife\n{FFFFFF}AK-47", "Play","");
269
                            gPlayerClass[playerid] = AMMUNITION;//setting the class to Spy
270
                            PickedClass[playerid] = 1;
271
                            SetPlayerVirtualWorld(playerid, 0);
272
                            ResetPlayerWeapons(playerid);
273
                            GivePlayerWeapon(playerid, 29, 990);//mp5
274
                            GivePlayerWeapon(playerid, 26, 100);//silent pistol
275
                            GivePlayerWeapon(playerid, 4, 1);//knife
276
                            GivePlayerWeapon(playerid, 30, 500);//moltove
277
                        }
278-
                            TogglePlayerControllable(playerid, 1);
278+
279
280
                    if(listitem == 5)//the listitem5, defines the number one option of the dialog
281
                    {
282
                        if(GetPlayerScore(playerid) >= 0)//if player have 0 score then  he can choose this class
283
                        {
284
                            SendClientMessage(playerid, COLOR_WHITE, "You chose the Boss as your class.");
285
                            ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Boss Class:", "{F81414}Abilities:\n{FFFFFF}You're the boss. You choose your enemies. /dis\n\n{F81414}Weapons:\n\n{FFFFFF}M4\n{FFFFFF}Grenade\n{FFFFFF}Pistol\n{FFFFFF}Molotov", "Play","");
286
                            gPlayerClass[playerid] = BOSS;//setting the class to Spy
287
                            PickedClass[playerid] = 1;
288
                            SetPlayerVirtualWorld(playerid, 0);
289
                            ResetPlayerWeapons(playerid);
290
                            GivePlayerWeapon(playerid, 31, 990);//mp5
291
                            GivePlayerWeapon(playerid, 22, 100);//silent pistol
292
                            GivePlayerWeapon(playerid, 16, 3);//knife
293
                            GivePlayerWeapon(playerid, 32, 500);//moltove
294
                        }
295
                    }
296-
                            TogglePlayerControllable(playerid, 1);
296+
297
            }
298
        }
299
    }
300
    return 1;
301
}