24.07.2013, 06:33
(
Последний раз редактировалось Cerealguy; 24.07.2013 в 18:22.
)
I have changed the gamemode grandlarc and I put everything pertaining to san fierro I deleted all of the fortunes and all that, but when you compile and turn on the server when I do not show up.
PHOTOS:
Normal login me and I get so
and when I give spawn
Help please, I want only appear after I work out how to do what others want, just want to automatically appear in san fierro
PHOTOS:
Normal login me and I get so
and when I give spawn
Help please, I want only appear after I work out how to do what others want, just want to automatically appear in san fierro
Код:
//---------------------------------------------------------- // // GRAND LARCENY 1.0 // A freeroam gamemode for SA-MP 0.3 // //---------------------------------------------------------- #include <a_samp> #include <core> #include <float> #include "../include/gl_common.inc" #include "../include/gl_spawns.inc" #include <time> #include <yom_buttons> #include <streamer> #include <Load> #include <SII> #include <fire> #pragma tabsize 0 //---------------------------------------------------------- //#define COLOR_WHITE 0xFFFFFFFF //#define COLOR_NORMAL_PLAYER 0xFFBB7777 #define COLOR_BITEM 0xE1B0B0FF #define COLOR_GRAD1 0xB4B5B7FF #define COLOR_GRAD2 0xBFC0C2FF #define COLOR_GRAD3 0xCBCCCEFF #define COLOR_GRAD4 0xD8D8D8FF #define COLOR_GRAD5 0xE3E3E3FF #define TEAM_HIT_COLOR 0xFFFFFF00 #define COLOR_GRAD6 0xF0F0F0FF #define COLOR_ADMIN 0xB2EBE0AA #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_LIGHTRED 0xFF6347AA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_LIGHTGREEN 0x9ACD32AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_LIGHTYELLOW 0xFFFF91FF #define COLOR_YELLOW2 0xF5DEB3AA #define COLOR_TAN 0xD2B48CFF #define COLOR_WHITE 0xFFFFFFAA #define COLOR_FADE1 0xE6E6E6E6 #define COLOR_FADE2 0xC8C8C8C8 #define COLOR_FADE3 0xAAAAAAAA #define COLOR_FADE4 0x8C8C8C8C #define COLOR_FADE5 0x6E6E6E6E #define COLOR_PURPLE 0xC2A2DAAA #define COLOR_DBLUE 0x2641FEAA #define COLOR_DOC 0xFF8282AA #define COLOR_DCHAT 0xF0CC00FF #define COLOR_NEWS 0xFFA500AA #define COLOR_OOC 0xE0FFFFAA #define COLOR_ORANGE 0xFF9900AA #define COLOR_FAKEBAN 0xA9C4E4AA #define TEAM_BLUE_COLOR 0x8D8DFF00 #define TEAM_GROVE_COLOR 0x00AA00FF #define TEAM_AZTECAS_COLOR 0x01FCFFC8 #define COLOR_STEELBLUE 0x4682B4FF #define NEWBIE_COLOR 0x7DAEFFFF #define COLOR_HOUSETEXT 0x5174AEFF #define CITY_SAN_FIERRO 0 new total_vehicles_from_files=0; // Class selection globals new gPlayerCitySelection[MAX_PLAYERS]; new gPlayerHasCitySelected[MAX_PLAYERS]; new gPlayerLastCitySelectionTick[MAX_PLAYERS]; new Text:txtClassSelHelper; new Text:txtSanFierro; //---------------------------------------- //---------------------------------------------------------- public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Test"); print("--------------------------------------\n"); return 1; } //---------------------------------------------------------- //TEAM COLORS #define TCOLOR_VIP 0xECFF0000 #define TCOLOR_WHITE 0xFFFFFF00 #define TCOLOR_LIGHTGREEN 0x9ACD3200 #define TCOLOR_NAVYBLUE 0x8D8DFF00 #define TCOLOR_BEIGE 0xA5937000 #define TCOLOR_GREY 0xBFC0C200 #define TCOLOR_DARKGREY 0x52545900 #define TCOLOR_BLUE 0x2641FE00 #define TCOLOR_LIGHTBLUE 0x2B77A100 #define TCOLOR_YELLOW 0xFFFF0000 #define TCOLOR_HELP 0x00D700FF #define TCOLOR_FIND 0x9B0000AA #define TCOLOR_WANTED 0xFF0000AA #define TCOLOR_PRISON 0xF4A41900 // COMMENTED #define TCOLOR_HOSPITAL 0xAFAFAF00 #define TCOLOR_PARAMEDIC 0xFF82820 //----------------------------------------------------------// //----------------------------------------------------------// public OnPlayerConnect(playerid) { GameTextForPlayer(playerid,"~w~ParouxGamerz",3000,4); SendClientMessage(playerid,COLOR_WHITE,"Welcome to {88AA88}C{FFFFFF}ops {88AA88}R{FFFFFF}obbers"); // class selection init vars gPlayerCitySelection[playerid] = -1; gPlayerHasCitySelected[playerid] = 0; gPlayerLastCitySelectionTick[playerid] = GetTickCount(); //SetPlayerColor(playerid,COLOR_NORMAL_PLAYER); return 1; } //---------------------------------------------------------- public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) return 1; new randSpawn = 0; SetPlayerInterior(playerid,0); TogglePlayerClock(playerid,0); if (CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) { randSpawn = random(sizeof(gRandomSpawns_SanFierro)); SetPlayerPos(playerid, gRandomSpawns_SanFierro[randSpawn][0], gRandomSpawns_SanFierro[randSpawn][1], gRandomSpawns_SanFierro[randSpawn][2]); SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]); } //SetPlayerColor(playerid,COLOR_NORMAL_PLAYER); SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200); SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,200); SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,200); SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,200); SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200); SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,200); SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200); SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,200); SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,200); SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,200); SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,200); GivePlayerWeapon(playerid,WEAPON_COLT45,100); //GivePlayerWeapon(playerid,WEAPON_MP5,100); TogglePlayerClock(playerid, 0); return 0; } //---------------------------------------------------------- public OnPlayerDeath(playerid, killerid, reason) { new playercash; // if they ever return to class selection make them city // select again first gPlayerHasCitySelected[playerid] = 0; if(killerid == INVALID_PLAYER_ID) { ResetPlayerMoney(playerid); } else { playercash = GetPlayerMoney(playerid); if(playercash > 0) { GivePlayerMoney(killerid, playercash); ResetPlayerMoney(playerid); } } return 1; } //---------------------------------------------------------- ClassSel_SetupCharSelection(playerid) { if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) { SetPlayerInterior(playerid,3); SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516); SetPlayerFacingAngle(playerid,181.0); SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516); SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516); } } //---------------------------------------------------------- // Used to init textdraws of city names ClassSel_InitCityNameText(Text:txtInit) { TextDrawUseBox(txtInit, 0); TextDrawLetterSize(txtInit,1.25,3.0); TextDrawFont(txtInit, 0); TextDrawSetShadow(txtInit,0); TextDrawSetOutline(txtInit,1); TextDrawColor(txtInit,0xEEEEEEFF); TextDrawBackgroundColor(txtClassSelHelper,0x000000FF); } //---------------------------------------------------------- ClassSel_InitTextDraws() { // Init our observer helper text display txtSanFierro = TextDrawCreate(10.0, 380.0, "San Fierro"); ClassSel_InitCityNameText(txtSanFierro); // Init our observer helper text display txtClassSelHelper = TextDrawCreate(10.0, 415.0, " Press ~b~~k~~GO_LEFT~ ~w~or ~b~~k~~GO_RIGHT~ ~w~to switch cities.~n~ Press ~r~~k~~PED_FIREWEAPON~ ~w~to select."); TextDrawUseBox(txtClassSelHelper, 1); TextDrawBoxColor(txtClassSelHelper,0x222222BB); TextDrawLetterSize(txtClassSelHelper,0.3,1.0); TextDrawTextSize(txtClassSelHelper,400.0,40.0); TextDrawFont(txtClassSelHelper, 2); TextDrawSetShadow(txtClassSelHelper,0); TextDrawSetOutline(txtClassSelHelper,1); TextDrawBackgroundColor(txtClassSelHelper,0x000000FF); TextDrawColor(txtClassSelHelper,0xFFFFFFFF); } //---------------------------------------------------------- /*ClassSel_SetupSelectedCity(playerid) { } if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) { SetPlayerInterior(playerid,3); SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516); SetPlayerFacingAngle(playerid,181.0); SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516); SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516); } }*/ //---------------------------------------------------------- /*ClassSel_SwitchToNextCity(playerid) { gPlayerCitySelection[playerid]++; if(gPlayerCitySelection[playerid] > CITY_SAN_FIERRO) { } PlayerPlaySound(playerid,1052,0.0,0.0,0.0); gPlayerLastCitySelectionTick[playerid] = GetTickCount(); ClassSel_SetupSelectedCity(playerid); }*/ //---------------------------------------------------------- /*ClassSel_SwitchToPreviousCity(playerid) { gPlayerCitySelection[playerid]--; if(gPlayerCitySelection[playerid] < CITY_SAN_FIERRO) { } PlayerPlaySound(playerid,1053,0.0,0.0,0.0); gPlayerLastCitySelectionTick[playerid] = GetTickCount(); ClassSel_SetupSelectedCity(playerid); }*/ //---------------------------------------------------------- /*ClassSel_HandleCitySelection(playerid) { new Keys,ud,lr; GetPlayerKeys(playerid,Keys,ud,lr); if(gPlayerCitySelection[playerid] == -1) { ClassSel_SwitchToNextCity(playerid); return; } // only allow new selection every ~500 ms if( (GetTickCount() - gPlayerLastCitySelectionTick[playerid]) < 500 ) return; if(Keys & KEY_FIRE) { gPlayerHasCitySelected[playerid] = 1; TextDrawHideForPlayer(playerid,txtClassSelHelper); TextDrawHideForPlayer(playerid,txtSanFierro); TogglePlayerSpectating(playerid,0); return; } if(lr > 0) { ClassSel_SwitchToNextCity(playerid); } else if(lr < 0) { ClassSel_SwitchToPreviousCity(playerid); } }*/ //---------------------------------------------------------- public OnPlayerRequestClass(playerid, classid) { if(IsPlayerNPC(playerid)) return 1; if(gPlayerHasCitySelected[playerid]) { ClassSel_SetupCharSelection(playerid); return 1; } else { if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) { TogglePlayerSpectating(playerid,1); TextDrawShowForPlayer(playerid, txtClassSelHelper); gPlayerCitySelection[playerid] = -1; } } return 0; } //---------------------------------------------------------- public OnGameModeInit() { SetGameModeText("Poroux Cops and Robbers"); ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL); ShowNameTags(1); SetNameTagDrawDistance(40.0); EnableStuntBonusForAll(0); DisableInteriorEnterExits(); SetWeather(2); SetWorldTime(11); //UsePlayerPedAnims(); //ManualVehicleEngineAndLights(); //LimitGlobalChatRadius(300.0); ClassSel_InitTextDraws(); // Player Class AddPlayerClass(29, -1498.7, 917.8, 7.1, 90, 5, 1, 22, 200, 30, 200); AddPlayerClass(29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // SAN FIERRO total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt"); printf("Total vehicles from files: %d",total_vehicles_from_files); return 1; } //---------------------------------------------------------- public OnPlayerUpdate(playerid) { if(!IsPlayerConnected(playerid)) return 0; if(IsPlayerNPC(playerid)) return 1; /*// changing cities by inputs if( !gPlayerHasCitySelected[playerid] && GetPlayerState(playerid) == PLAYER_STATE_SPECTATING ) { ClassSel_HandleCitySelection(playerid); return 1; }*/ /*// No weapons in interiors if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) { SetPlayerArmedWeapon(playerid,0); // fists return 0; // no syncing until they change their weapon }*/ /*// Don't allow minigun if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN) { Kick(playerid); return 0; }*/ /* No jetpacks allowed if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) { Kick(playerid); return 0; }*/ /* For testing animations new msg[128+1]; new animlib[32+1]; new animname[32+1]; thisanimid = GetPlayerAnimationIndex(playerid); if(lastanimid != thisanimid) { GetAnimationName(thisanimid,animlib,32,animname,32); format(msg, 128, "anim(%d,%d): %s %s", lastanimid, thisanimid, animlib, animname); lastanimid = thisanimid; SendClientMessage(playerid, 0xFFFFFFFF, msg); }*/ return 1; } //----------------------------------------------------------