SHOW:
|
|
- or go back to the newest paste.
1 | public OnPlayerSpawn(playerid) | |
2 | { | |
3 | if(GetPlayerTeam(playerid) == TEAM_TRUCKER) | |
4 | { | |
5 | SetPlayerColor(playerid, 0xF9FF00FF); | |
6 | SetPlayerInterior(playerid,0); | |
7 | ShowPlayerDialog(playerid,11,DIALOG_STYLE_LIST,"Depots","LV\nSF\nLS\nLV-Bottom\nCustom Depot1\nCustom Depot2","Select","Cancel"); | |
8 | } | |
9 | ||
10 | if(GetPlayerTeam(playerid) == TEAM_POLICE) | |
11 | { | |
12 | SetPlayerColor(playerid, STEEL); | |
13 | SetPlayerInterior(playerid,0); | |
14 | - | |
14 | + | } |
15 | //more team options | |
16 | - | //anything |
16 | + | |
17 | } | |
18 | - | } |
18 | + | |
19 | stock PlayerColor(playerid) | |
20 | { | |
21 | if(GetPlayerTeam(playerid) == TEAM_TRUCKER) | |
22 | { | |
23 | - | stock PlayerColor(playerid) |
23 | + | |
24 | } | |
25 | if(GetPlayerTeam(playerid) == TEAM_Police) | |
26 | { | |
27 | SetPlayerColor(playerid, STEEL); | |
28 | } | |
29 | return 1; | |
30 | } | |
31 | ||
32 | public OnPlayerEnterCheckpoint(playerid) | |
33 | { | |
34 | M_OnPlayerEnterCheckpoint(playerid); | |
35 | return 1; | |
36 | } | |
37 | ||
38 | public OnPlayerEnterRaceCheckpoint(playerid) | |
39 | { | |
40 | M_OnPlayerEnterRaceCheckpoint(playerid); | |
41 | return 1; | |
42 | } | |
43 | ||
44 | public OnPlayerFinishMission(playerid) | |
45 | { | |
46 | SendClientMessage(playerid, 0xFFFFFFAA, "You have succesfully delivered the goods!"); | |
47 | return 1; | |
48 | } | |
49 | ||
50 | public OnPlayerDeath(playerid, killerid, reason) | |
51 | { | |
52 | return 1; | |
53 | } | |
54 | ||
55 | public OnPlayerRequestClass(playerid,classid) | |
56 | { | |
57 | SetupPlayerForClassSelection(playerid); | |
58 | switch(classid) | |
59 | { | |
60 | case 0..4: | |
61 | { | |
62 | GameTextForPlayer(playerid,"Trucker",2000,4); | |
63 | SetPlayerTeam(playerid,TEAM_TRUCKER); | |
64 | playerClass[playerid] = TEAM_TRUCKER; | |
65 | } | |
66 | case 5..8: | |
67 | { | |
68 | GameTextForPlayer(playerid,"Cop",2000,4); | |
69 | SetPlayerTeam(playerid, TEAM_POLICE); | |
70 | playerClass[playerid] = TEAM_POLICE; | |
71 | - | if(playerClass[playerid] = classid; |
71 | + | |
72 | - | if(GetPlayerScore(playerid) < 50){ GameTextForPlayer(playerid,"50 score needed for cop!",2000,4); return 0; } |
72 | + | |
73 | ||
74 | return 1; | |
75 | } | |
76 | public OnPlayerRequestSpawn(playerid) | |
77 | { | |
78 | if( playerClass[playerid] == TEAM_POLICE && GetPlayerScore(playerid) < 50) | |
79 | { | |
80 | GameTextForPlayer(playerid,"50 score needed for cop!",2000,4); | |
81 | return 0; | |
82 | } | |
83 | return 1; | |
84 | } | |
85 | //you were missing this: | |
86 | SetupPlayerForClassSelection(playerid) | |
87 | { | |
88 | SetPlayerInterior(playerid,0); | |
89 | SetPlayerPos(playerid,-2185.3379,-215.7184,36.5156); | |
90 | SetPlayerFacingAngle(playerid,1.2634); | |
91 | SetPlayerCameraPos(playerid,-2185.4082,-210.2631,36.5156); | |
92 | SetPlayerCameraLookAt(playerid,-2185.3379,-215.7184,36.5156); | |
93 | } |