Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerUpdate(playerid)
- {
- if(playerVariables[playerid][pTutorial] == 1) {
- new
- Keys,
- ud,
- lr;
- GetPlayerKeys(playerid, Keys, ud, lr);
- if(lr > 0) {
- if(playerVariables[playerid][pSkinCount]+1 >= sizeof(tutorialSkins)) {
- SetPlayerSkin(playerid, 0);
- playerVariables[playerid][pSkinCount] = 0;
- PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
- }
- else {
- playerVariables[playerid][pSkinCount]++;
- SetPlayerSkin(playerid, tutorialSkins[playerVariables[playerid][pSkinCount]]);
- }
- }
- else if(lr < 0) {
- if(playerVariables[playerid][pSkinCount]-1 < 0) {
- SetPlayerSkin(playerid, 0);
- playerVariables[playerid][pSkinCount] = 0;
- PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
- }
- else {
- playerVariables[playerid][pSkinCount]--;
- SetPlayerSkin(playerid, tutorialSkins[playerVariables[playerid][pSkinCount]]);
- }
- }
- }
- if(playerVariables[playerid][pOnRequest] != INVALID_PLAYER_ID) {
- new
- Keys,
- ud,
- lr;
- GetPlayerKeys(playerid, Keys, ud, lr);
- if(lr > 0) {
- GetPlayerPos(playerVariables[playerid][pOnRequest], playerVariables[playerVariables[playerid][pOnRequest]][pPos][0], playerVariables[playerVariables[playerid][pOnRequest]][pPos][1], playerVariables[playerVariables[playerid][pOnRequest]][pPos][2]);
- SetPlayerPos(playerid, playerVariables[playerVariables[playerid][pOnRequest]][pPos][0], playerVariables[playerVariables[playerid][pOnRequest]][pPos][1], playerVariables[playerVariables[playerid][pOnRequest]][pPos][2]);
- TextDrawHideForPlayer(playerid, textdrawVariables[1]);
- SendClientMessage(playerid, COLOR_WHITE, "You have teleported to the player who has requested help.");
- playerVariables[playerid][pOnRequest] = INVALID_PLAYER_ID;
- }
- else if(lr < 0) {
- TextDrawHideForPlayer(playerid, textdrawVariables[1]);
- playerVariables[playerid][pOnRequest] = INVALID_PLAYER_ID;
- }
- }
- if(playerVariables[playerid][pTabbed] == 1) {
- playerVariables[playerid][pTabbed] = 0;
- DestroyDynamic3DTextLabel(playerVariables[playerid][pAFKLabel]);
- if(playerVariables[playerid][pOutstandingWeaponRemovalSlot] >= 1) {
- if(playerVariables[playerid][pOutstandingWeaponRemovalSlot] == 40) {
- ResetPlayerWeapons(playerid);
- }
- else {
- ResetPlayerWeapons(playerid);
- playerVariables[playerid][pWeapons][playerVariables[playerid][pOutstandingWeaponRemovalSlot]] = 0;
- givePlayerWeapons(playerid);
- }
- playerVariables[playerid][pAnticheatExemption] = 6;
- }
- }
- if(playerVariables[playerid][pTutorial] >= 4 && playerVariables[playerid][pTutorial] < 14 && GetPVarInt(playerid, "tutTime") > 0)
- TextDrawShowForPlayer(playerid, textdrawVariables[8]);
- if(playerVariables[playerid][pTutorial] >= 4 && playerVariables[playerid][pTutorial] < 14 && GetPVarInt(playerid, "tutTime") < 1) {
- new
- Keys,
- ud,
- lr;
- GetPlayerKeys(playerid, Keys, ud, lr);
- if(lr > 0) {
- playerVariables[playerid][pTutorial]++;
- switch(playerVariables[playerid][pTutorial]) {
- case 5: {
- SendClientMessage(playerid, COLOR_YELLOW, "Overview");
- SendClientMessage(playerid, COLOR_WHITE, "This is a roleplay server, which means you act out a character as if it were real.");
- SendClientMessage(playerid, COLOR_WHITE, "Pressing the button to open the textbox (usually T) and simply typing a message,");
- SendClientMessage(playerid, COLOR_WHITE, "will broadcast what you've typed to the people around you as an 'IC' (in character) message.");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, "Using /b and typing your message (e.g. /b hello) will enclose what you've written in double parenthesis.");
- SendClientMessage(playerid, COLOR_WHITE, "This will broadcast your message to the people around you as an 'OOC' (out of character) message.");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, "Similarly, using /o has the same purpose as /b, though this time the message will be broadcasted throughout the entire server.");
- SetPVarInt(playerid, "tutTime", 10);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- SendClientMessage(playerid, COLOR_YELLOW, "");
- }
- case 6: {
- clearScreen(playerid);
- SendClientMessage(playerid, COLOR_YELLOW, "Locations:");
- SendClientMessage(playerid, COLOR_YELLOW, "");
- SendClientMessage(playerid, COLOR_YELLOW, "The Bank");
- SendClientMessage(playerid, COLOR_WHITE, "This is the place you'll want to go to make your various monetary transactions.");
- SendClientMessage(playerid, COLOR_WHITE, "The following commands will be useful:");
- SendClientMessage(playerid, COLOR_WHITE, "/balance, /withdraw and /deposit");
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- SetPlayerCameraPos(playerid, 608.430480, -1203.073608, 17.801227);
- SetPlayerCameraLookAt(playerid, 594.246276, -1237.907348, 17.801227);
- SetPlayerPos(playerid, 526.8502, -1261.1985, 16.2272-30);
- SetPVarInt(playerid, "tutTime", 4);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- SendClientMessage(playerid, COLOR_YELLOW, "");
- }
- case 7: {
- SendClientMessage(playerid, COLOR_YELLOW, "The Crane");
- SendClientMessage(playerid, COLOR_WHITE, "At the crane, you can drop off vehicles for money.");
- SendClientMessage(playerid, COLOR_WHITE, "Use the command /dropcar to drive the vehicle to the red marker.");
- SetPlayerCameraPos(playerid, 2637.447265, -2226.906738, 16.296875);
- SetPlayerCameraLookAt(playerid, 2651.442626, -2227.208496, 16.296875);
- SetPlayerPos(playerid, 2641.4473, -2226.9067, 16.2969-30);
- SetPVarInt(playerid, "tutTime", 5);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- SendClientMessage(playerid, COLOR_YELLOW, "");
- }
- case 8: {
- SendClientMessage(playerid, COLOR_YELLOW, "Los Santos Police Department");
- SendClientMessage(playerid, COLOR_WHITE, "This is the place where you'll find police officers.");
- SendClientMessage(playerid, COLOR_WHITE, "Inside, you should wait in lobby before being served.");
- SendClientMessage(playerid, COLOR_WHITE, "If you want to apply to the LSPD, please visit our forum.");
- SetPlayerCameraPos(playerid, 1495.273925, -1675.542358, 28.382812);
- SetPlayerCameraLookAt(playerid, 1535.268432, -1675.874023, 13.382812);
- SetPlayerPos(playerid, 2641.4473, -2226.9067, 16.2969-30);
- SetPVarInt(playerid, "tutTime", 6);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- SendClientMessage(playerid, COLOR_YELLOW, "");
- }
- case 9: {
- clearScreen(playerid);
- SendClientMessage(playerid, COLOR_YELLOW, "Jobs:");
- SendClientMessage(playerid, COLOR_YELLOW, "");
- SendClientMessage(playerid, COLOR_WHITE, "Having a job gives you something to do. ");
- SendClientMessage(playerid, COLOR_WHITE, "Your job may also have a skill depending on the job you have.");
- SendClientMessage(playerid, COLOR_WHITE, "All jobs are productive in some way.");
- SetPVarInt(playerid, "tutTime", 2);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- SendClientMessage(playerid, COLOR_YELLOW, "");
- }
- case 10: {
- SendClientMessage(playerid, COLOR_YELLOW, "Mechanic Job");
- SendClientMessage(playerid, COLOR_WHITE, "You can find the Mechanic job near the crane at Ocean Docks.");
- SendClientMessage(playerid, COLOR_WHITE, "A mechanic can repair vehicles, add nitrous and even repaint vehicles.");
- SetPlayerCameraPos(playerid, 2314.167724, -2328.139892, 21.382812);
- SetPlayerCameraLookAt(playerid, 2323.291748, -2321.122314, 13.382812);
- SetPlayerPos(playerid, 2316.1677, -2328.1399, 13.3828-30);
- SetPVarInt(playerid, "tutTime", 5);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- SendClientMessage(playerid, COLOR_YELLOW, "");
- }
- case 11: {
- SendClientMessage(playerid, COLOR_YELLOW, "Arms Dealer Job");
- SendClientMessage(playerid, COLOR_WHITE, "You can find the Arms Dealer job at the front of LS Ammunation.");
- SendClientMessage(playerid, COLOR_WHITE, "An arms dealer goes on material runs to obtain materials.");
- SendClientMessage(playerid, COLOR_WHITE, "They can then use those materials to create weapons.");
- SendClientMessage(playerid, COLOR_WHITE, "There are ten weapon levels.");
- SendClientMessage(playerid, COLOR_WHITE, "Each level unlocks a new weapon. Every 50 weapons levels you up.");
- SetPlayerCameraPos(playerid, 1353.600097, -1301.909790, 19.382812);
- SetPlayerCameraLookAt(playerid, 1361.592285, -1285.515136, 13.382812);
- SetPlayerPos(playerid, 1351.6001, -1285.9098, 13.3828-30);
- SetPVarInt(playerid, "tutTime", 6);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- SendClientMessage(playerid, COLOR_YELLOW, "");
- }
- case 12: {
- SendClientMessage(playerid, COLOR_YELLOW, "Detective Job");
- SendClientMessage(playerid, COLOR_WHITE, "You can find the Detective job near the bank.");
- SendClientMessage(playerid, COLOR_WHITE, "A detective can track people, vehicles and houses");
- SendClientMessage(playerid, COLOR_WHITE, "To track vehicles and houses, however, you'll need to level up.");
- SendClientMessage(playerid, COLOR_WHITE, "As with the arms dealer job, there are 10 levels.");
- SendClientMessage(playerid, COLOR_WHITE, "Every 50 searches levels you up.");
- SetPlayerCameraPos(playerid, 622.514709, -1458.283691, 22.256816);
- SetPlayerCameraLookAt(playerid, 612.514709, -1458.298583, 14.256817);
- SetPlayerPos(playerid, 622.5147, -1458.2837, 14.2568-30);
- SetPVarInt(playerid, "tutTime", 10);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- case 13: {
- SendClientMessage(playerid, COLOR_YELLOW, "Levels");
- SendClientMessage(playerid, COLOR_WHITE, "A very new feature to this script is a levels system.");
- SendClientMessage(playerid, COLOR_WHITE, "");
- SendClientMessage(playerid, COLOR_WHITE, "You can now gain OOC levels which will benefit you throughout the server.");
- SendClientMessage(playerid, COLOR_WHITE, "As of present, levels don't really do much - but future updates shall introduce a bunch of new features!");
- SendClientMessage(playerid, COLOR_WHITE, "");
- SendClientMessage(playerid, COLOR_WHITE, "You can only level up every X hours, and it costs money from your character's bank account.");
- SetPlayerCameraPos(playerid, 622.514709, -1458.283691, 22.256816);
- SetPlayerCameraLookAt(playerid, 612.514709, -1458.298583, 14.256817);
- SetPlayerPos(playerid, 622.5147, -1458.2837, 14.2568-30);
- SetPVarInt(playerid, "tutTime", 10);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- case 14: {
- SendClientMessage(playerid, COLOR_YELLOW, "Conclusion");
- SendClientMessage(playerid, COLOR_WHITE, "Thanks for reading/watching the tutorial, your character will now spawn. ");
- SendClientMessage(playerid, COLOR_WHITE, "If you have any questions or concerns which relate to gameplay on our server, please use "EMBED_GREY"/n"EMBED_WHITE".");
- SendClientMessage(playerid, COLOR_WHITE, "If you wish to obtain help from an official member of staff, please use "EMBED_GREY"/helpme"EMBED_WHITE".");
- SendClientMessage(playerid, COLOR_WHITE, "If you see any players breaking rules, please use "EMBED_GREY"/report"EMBED_WHITE".");
- format(szMessage, sizeof(szMessage), "Last, but not least, please make sure that you register on our community forums: "EMBED_GREY"%s"EMBED_WHITE".", szServerWebsite);
- SendClientMessage(playerid, COLOR_WHITE, szMessage);
- firstPlayerSpawn(playerid);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- }
- }
- else if(lr < 0) {
- playerVariables[playerid][pTutorial]--;
- if(playerVariables[playerid][pTutorial] < 5) {
- playerVariables[playerid][pTutorial] = 5;
- PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
- }
- switch(playerVariables[playerid][pTutorial]) {
- case 5: {
- SendClientMessage(playerid, COLOR_YELLOW, "Overview");
- SendClientMessage(playerid, COLOR_WHITE, "This is a roleplay server, which means you act out a character as if it were real.");
- SendClientMessage(playerid, COLOR_WHITE, "Pressing the button to open the textbox (usually T) and simply typing a message,");
- SendClientMessage(playerid, COLOR_WHITE, "will broadcast what you've typed to the people around you as an 'IC' (in character) message.");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, "Using /b and typing your message (e.g. /b hello) will enclose what you've written in double parenthesis.");
- SendClientMessage(playerid, COLOR_WHITE, "This will broadcast your message to the people around you as an 'OOC' (out of character) message.");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, "Similarly, using /o has the same purpose as /b, though this time the message will be broadcasted throughout the entire server.");
- SetPVarInt(playerid, "tutTime", 10);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- case 6: {
- clearScreen(playerid);
- SendClientMessage(playerid, COLOR_YELLOW, "Locations:");
- SendClientMessage(playerid, COLOR_YELLOW, "");
- SendClientMessage(playerid, COLOR_YELLOW, "The Bank");
- SendClientMessage(playerid, COLOR_WHITE, "This is the place you'll want to go to make your various monetary transactions.");
- SendClientMessage(playerid, COLOR_WHITE, "The following commands will be useful:");
- SendClientMessage(playerid, COLOR_WHITE, "/balance, /withdraw and /deposit");
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- SetPlayerCameraPos(playerid, 608.430480, -1203.073608, 17.801227);
- SetPlayerCameraLookAt(playerid, 594.246276, -1237.907348, 17.801227);
- SetPlayerPos(playerid, 526.8502, -1261.1985, 16.2272-30);
- SetPVarInt(playerid, "tutTime", 4);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- case 7: {
- SendClientMessage(playerid, COLOR_YELLOW, "The Crane");
- SendClientMessage(playerid, COLOR_WHITE, "At the crane, you can drop off vehicles for money.");
- SendClientMessage(playerid, COLOR_WHITE, "Use the command /dropcar to drive the vehicle to the red marker.");
- SetPlayerCameraPos(playerid, 2637.447265, -2226.906738, 16.296875);
- SetPlayerCameraLookAt(playerid, 2651.442626, -2227.208496, 16.296875);
- SetPlayerPos(playerid, 2641.4473, -2226.9067, 16.2969-30);
- SetPVarInt(playerid, "tutTime", 5);
- TextDrawHideForPlayer(playerid, textdrawVariables[8]);
- }
- case 8: {
- SendClientMessage(playerid, COLOR_YELLOW, "Los Santos Police Department");
- SendClientMessage(playerid, COLOR_WHITE, "This is the place where you'll find police officers.");
- SendClientMessage(playerid, COLOR_WHITE, "Inside, you should wait in lobby before being served.");
- SendClientMessage(playerid, COLOR_WHITE, "If you want to apply to the LSPD, please visit our forum.");
- SetPlayerCameraPos(playerid, 1495.273925, -1675.542358, 28.382812);
- SetPlayerCameraLookAt(playerid, 1535.268432, -1675.874023, 13.382812);
- SetPlayerPos(playerid, 2641.4473, -2226.9067, 16.2969-30);
- SetPVarInt(playerid, "tutTime", 6);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- case 9: {
- clearScreen(playerid);
- SendClientMessage(playerid, COLOR_YELLOW, "Jobs:");
- SendClientMessage(playerid, COLOR_YELLOW, "");
- SendClientMessage(playerid, COLOR_WHITE, "Having a job gives you something to do. ");
- SendClientMessage(playerid, COLOR_WHITE, "Your job may also have a skill depending on the job you have.");
- SendClientMessage(playerid, COLOR_WHITE, "All jobs are productive in some way.");
- SetPVarInt(playerid, "tutTime", 5);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- case 10: {
- SendClientMessage(playerid, COLOR_YELLOW, "Mechanic Job");
- SendClientMessage(playerid, COLOR_WHITE, "You can find the Mechanic job near the crane at Ocean Docks.");
- SendClientMessage(playerid, COLOR_WHITE, "A mechanic can repair vehicles, add nitrous and even repaint vehicles.");
- SetPlayerCameraPos(playerid, 2314.167724, -2328.139892, 21.382812);
- SetPlayerCameraLookAt(playerid, 2323.291748, -2321.122314, 13.382812);
- SetPlayerPos(playerid, 2316.1677, -2328.1399, 13.3828-30);
- SetPVarInt(playerid, "tutTime", 5);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- case 11: {
- SendClientMessage(playerid, COLOR_YELLOW, "Arms Dealer Job");
- SendClientMessage(playerid, COLOR_WHITE, "You can find the Arms Dealer job at the front of LS Ammunation.");
- SendClientMessage(playerid, COLOR_WHITE, "An arms dealer goes on material runs to obtain materials.");
- SendClientMessage(playerid, COLOR_WHITE, "They can then use those materials to create weapons.");
- SendClientMessage(playerid, COLOR_WHITE, "There are ten weapon levels.");
- SendClientMessage(playerid, COLOR_WHITE, "Each level unlocks a new weapon. Every 50 weapons levels you up.");
- SetPlayerCameraPos(playerid, 1353.600097, -1301.909790, 19.382812);
- SetPlayerCameraLookAt(playerid, 1361.592285, -1285.515136, 13.382812);
- SetPlayerPos(playerid, 1351.6001, -1285.9098, 13.3828-30);
- SetPVarInt(playerid, "tutTime", 10);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- case 12: {
- SendClientMessage(playerid, COLOR_YELLOW, "Detective Job");
- SendClientMessage(playerid, COLOR_WHITE, "You can find the Detective job near the bank.");
- SendClientMessage(playerid, COLOR_WHITE, "A detective can track people, vehicles and houses");
- SendClientMessage(playerid, COLOR_WHITE, "To track vehicles and houses, however, you'll need to level up.");
- SendClientMessage(playerid, COLOR_WHITE, "As with the arms dealer job, there are 10 levels.");
- SendClientMessage(playerid, COLOR_WHITE, "Every 50 searches levels you up.");
- SetPlayerCameraPos(playerid, 622.514709, -1458.283691, 22.256816);
- SetPlayerCameraLookAt(playerid, 612.514709, -1458.298583, 14.256817);
- SetPlayerPos(playerid, 622.5147, -1458.2837, 14.2568-30);
- SetPVarInt(playerid, "tutTime", 10);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- case 13: {
- SendClientMessage(playerid, COLOR_YELLOW, "Levels");
- SendClientMessage(playerid, COLOR_WHITE, "A very new feature to this script is a levels system.");
- SendClientMessage(playerid, COLOR_WHITE, "");
- SendClientMessage(playerid, COLOR_WHITE, "You can now gain OOC levels which will benefit you throughout the server.");
- SendClientMessage(playerid, COLOR_WHITE, "As of present, levels don't really do much - but future updates shall introduce a bunch of new features!");
- SendClientMessage(playerid, COLOR_WHITE, "");
- SendClientMessage(playerid, COLOR_WHITE, "You can only level up every X hours, and it costs money from your character's bank account.");
- SetPlayerCameraPos(playerid, 622.514709, -1458.283691, 22.256816);
- SetPlayerCameraLookAt(playerid, 612.514709, -1458.298583, 14.256817);
- SetPlayerPos(playerid, 622.5147, -1458.2837, 14.2568-30);
- SetPVarInt(playerid, "tutTime", 10);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- case 14: {
- SendClientMessage(playerid, COLOR_YELLOW, "Conclusion");
- SendClientMessage(playerid, COLOR_WHITE, "Thanks for reading/watching the tutorial, your character will now spawn. ");
- SendClientMessage(playerid, COLOR_WHITE, "If you have any questions or concerns which relate to gameplay on our server, please use "EMBED_GREY"/n"EMBED_WHITE".");
- SendClientMessage(playerid, COLOR_WHITE, "If you wish to obtain help from an official member of staff, please use "EMBED_GREY"/helpme"EMBED_WHITE".");
- SendClientMessage(playerid, COLOR_WHITE, "If you see any players breaking rules, please use "EMBED_GREY"/report"EMBED_WHITE".");
- format(szMessage, sizeof(szMessage), "Last, but not least, please make sure that you register on our community forums: "EMBED_GREY"%s"EMBED_WHITE".", szServerWebsite);
- SendClientMessage(playerid, COLOR_WHITE, szMessage);
- firstPlayerSpawn(playerid);
- TextDrawHideForPlayer(playerid, textdrawVariables[7]);
- }
- }
- }
- }
- if(GetPlayerState(playerid) == 2) {
- for(new v; v < MAX_SPIKES; v++) {
- if(spikeVariables[v][sPos][0] != 0 && spikeVariables[v][sPos][1] != 0 && spikeVariables[v][sPos][2] != 0) {
- if(IsVehicleInRangeOfPoint(GetPlayerVehicleID(playerid), 2.0, spikeVariables[v][sPos][0], spikeVariables[v][sPos][1], spikeVariables[v][sPos][2])) {
- new
- Damage[4];
- GetVehicleDamageStatus(GetPlayerVehicleID(playerid), Damage[0], Damage[1], Damage[2], Damage[3]); // Set tires to 15 and watch 'em pop.
- UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), Damage[0], Damage[1], Damage[2], 15);
- }
- }
- }
- }
- playerVariables[playerid][pConnectedSeconds] = gettime();
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment