25.11.2010, 19:30
Hello, as subject says, my infinite NOS dosent work! ill post whole gamemode because its small and got no maps/other stuff you could possible want to steal... And its more than just "one place" for the inf NOS so i think it will be best this way... its weird, my friend copyed directly from his server (works there) into my gamemode, and i get no errors while compiling, but it just simply dosent work!
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT //------------------------------------------------ #define COLOR_BRIGHTRED 0xE60000FF #define COLOR_BLUE 0x0000FFAA #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_PURPLE 0x9900FFAA #define COLOR_BROWN 0x993300AA #define COLOR_ORANGE 0xFF9933AA #define COLOR_CYAN 0x99FFFFAA #define COLOR_TAN 0xFFFFCCAA #define COLOR_PINK 0xFF66FFAA #define COLOR_KHAKI 0x999900AA #define COLOR_LIME 0x99FF00AA #define COLOR_BLACK 0x000000AA #define COLOR_TURQ 0x00A3C0AA #define COLOR_LIGHTBLUE 0xBBFFFFFF #define COLOR_DARKRED 0xAA993333 #define COLOR_VIOLET 0x9955DEEE #define NICE_BLUE 0xa0d3ffAA #define GREEN 0x21DD00FF #define RED 0xE60000FF #define ADMIN_RED 0xFB0000FF #define YELLOW 0xFFFF00FF #define ORANGE 0xF97804FF #define LIGHTRED 0xFF8080FF #define LIGHTBLUE 0x00C2ECFF #define PURPLE 0xB360FDFF #define PLAYER_COLOR 0xFFFFFFFF #define BLUE 0x1229FAFF #define LIGHTGREEN 0x38FF06FF #define DARKPINK 0xE100E1FF #define DARKGREEN 0x008040FF #define ANNOUNCEMENT 0x00CACAFB #define AFK 0x6AF7E1FF #define COLOR_SYSTEM 0xEFEFF7AA #define PLAYER_VIEW 0xC0C0C0FF #define COLOR_GRAD1 0xB4B5B7FF #define NICESKY 0x99FFFFAA #define GRAY 0xCECECEFF #define purple 0xC2A2DAAA #define MAX_INVALID_NOS_VEHICLES 29 //----------------------------------------------- #include <a_samp> new Saved[MAX_PLAYERS]; new Float: SavedPos[MAX_PLAYERS][3]; #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Welcome to Stunt Revolution!"); print("----------------------------------\n"); } #endif public OnGameModeInit() { //classes for (new i = 0; i < 300; i++) { if (IsValidSkin(i)) { AddPlayerClass(i, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //Adds all classes. } } return 1; } IsValidSkin(skinid) { switch (skinid) { case 0, 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 265, 266, 267, 273, 289: { return 0; } //Unavailible classes and classes you dont want. default: {return 1;} } return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerInterior(playerid, 3); SetPlayerPos(playerid, 1206.29, -40.49, 1000.95); SetPlayerFacingAngle(playerid, 318.32); SetPlayerCameraPos(playerid, 1207.70, -37.59, 1001.62); SetPlayerCameraLookAt(playerid, 1205.54, -42.10, 1000.77); return 1; } public OnPlayerConnect(playerid) { SendClientMessage(playerid,RED,"Welcome to Stunt Revolution!"); SendClientMessage(playerid,RED,"Start Of By Typing /Help in the Chat!"); return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { SetPlayerInterior(playerid, 0); return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/loadpos", cmdtext, true, 10) == 0) { if(Saved[playerid]==0)return SendClientMessage(playerid,0xFF0D13FF,"ERROR: You have not yet saved a location. (/savepos)"); else if(GetPlayerState(playerid)==2) { SendClientMessage(playerid,0xFF0D13FF,"Position loaded."); SetVehiclePos(GetPlayerVehicleID(playerid),SavedPos[playerid][0],SavedPos[playerid][1],SavedPos[playerid][2]); } else { SetPlayerPos(playerid,SavedPos[playerid][0],SavedPos[playerid][1],SavedPos[playerid][2]); SendClientMessage(playerid,0xFF0D13FF,"Position loaded."); } return 1; } if (strcmp("/savepos", cmdtext, true, 10) == 0) { GetPlayerPos(playerid,SavedPos[playerid][0],SavedPos[playerid][1],SavedPos[playerid][2]); Saved[playerid]=1; SendClientMessage(playerid,0xFF0D13FF,"Position saved."); return 1; } if(strcmp(cmdtext, "/help", true) == 0) { SendClientMessage(playerid, RED, "~~~Help~~~ "); SendClientMessage(playerid, RED, "First Of All Read The Rules! "); SendClientMessage(playerid, RED, "Do So By Typing /Rules In The Chat Window "); SendClientMessage(playerid, RED, "/Teles To See All Of The Teleports. "); SendClientMessage(playerid, RED, "/Carmenu To Open The Vehicle Menu. "); SendClientMessage(playerid, RED, "/Anims To See More About Animations. "); SendClientMessage(playerid, RED, "/Website If You Would Like To Visit Our Forums. "); SendClientMessage(playerid, RED, "/Count To Start A Countdown !. "); SendClientMessage(playerid, RED, "If You Would Like To Talk More Private "); SendClientMessage(playerid, RED, "You Can PM Your Friends With /PM Followed By Their ID or Nickname. "); return 1; } if (strcmp("/count", cmdtext, true, 10) == 0) { SetTimer("Five", 1000, 0); SetTimer("Four", 2000, 0); SetTimer("Three", 3000, 0); SetTimer("Two", 4000, 0); SetTimer("One", 5000, 0); SetTimer("GoGoGo", 6000, 0); return 1; } if(strcmp(cmdtext, "/rules", true) == 0) { SendClientMessage(playerid, RED, " ~~Rules~~"); SendClientMessage(playerid, RED, "Never beg to be an admin! If you would like to be an admin sign up at forums"); SendClientMessage(playerid, RED, "Never steal other peoples cars! (Not their wifes either hihi !)"); SendClientMessage(playerid, RED, "NEVER deathmatch outside of deathmatch ares, it WILL lead to an kick/bann"); SendClientMessage(playerid, RED, "And remember, be nice to people and they will be nice to you! "); return 1; } if (strcmp(cmdtext, "/website", true) == 0) { SendClientMessage(playerid, YELLOW, "www.StuntRevolutionServer.tk"); return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } forward NitroReset(); public NitroReset() { for(new i = 0; i<MAX_PLAYERS; i++) { if(!IsPlayerInInvalidNosVehicle(i,GetPlayerVehicleID(i))) { new vehicle = GetPlayerVehicleID(i); AddVehicleComponent(vehicle, 1010); } } } forward One(); forward Two(); forward Three(); forward Four(); forward Five(); forward GoGoGo(); public Five() { GameTextForAll("~w~5",2000,3); return 1; } public Four() { GameTextForAll("~b~4",2000,3); return 1; } public Three() { GameTextForAll("~y~3",2000,3); return 1; } public Two() { GameTextForAll("~p~2",2000,3); return 1; } public One() { GameTextForAll("~r~1",2000,3); return 1; } public GoGoGo() { GameTextForAll("~g~GO GO GO!",3000,3); return 1; } //-------------------------[ IsPlayerInValidNosVehicle ]------------------------------- IsPlayerInInvalidNosVehicle(playerid,vehicleid) { #define MAX_INVALID_NOS_VEHICLES 29 new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] = { 581,523,462,521,463,522,461,448,468,586, 509,481,510,472,473,493,595,484,430,453, 452,446,454,590,569,537,538,570,449 }; vehicleid = GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid,vehicleid)) { for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++) { if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i]) { return true; } } } return false; }