Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" ");[BWS]Filescript by [BWS]ZheFoxy
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- new aVehicleNames[212][] = {
- {"Landstalker"},
- {"Bravura"},
- {"Buffalo"},
- {"Linerunner"},
- {"Perrenial"},
- {"Sentinel"},
- {"Dumper"},
- {"Firetruck"},
- {"Trashmaster"},
- {"Stretch"},
- {"Manana"},
- {"Infernus"},
- {"Voodoo"},
- {"Pony"},
- {"Mule"},
- {"Cheetah"},
- {"Ambulance"},
- {"Leviathan"},
- {"Moonbeam"},
- {"Esperanto"},
- {"Taxi"},
- {"Washington"},
- {"Bobcat"},
- {"Mr Whoopee"},
- {"BF Injection"},
- {"Hunter"},
- {"Premier"},
- {"Enforcer"},
- {"Securicar"},
- {"Banshee"},
- {"Predator"},
- {"Bus"},
- {"Rhino"},
- {"Barracks"},
- {"Hotknife"},
- {"Trailer 1"},
- {"Previon"},
- {"Coach"},
- {"Cabbie"},
- {"Stallion"},
- {"Rumpo"},
- {"RC Bandit"},
- {"Romero"},
- {"Packer"},
- {"Monster"},
- {"Admiral"},
- {"Squalo"},
- {"Seasparrow"},
- {"Pizzaboy"},
- {"Tram"},
- {"Trailer 2"},
- {"Turismo"},
- {"Speeder"},
- {"Reefer"},
- {"Tropic"},
- {"Flatbed"},
- {"Yankee"},
- {"Caddy"},
- {"Solair"},
- {"Berkley's RC Van"},
- {"Skimmer"},
- {"PCJ-600"},
- {"Faggio"},
- {"Freeway"},
- {"RC Baron"},
- {"RC Raider"},
- {"Glendale"},
- {"Oceanic"},
- {"Sanchez"},
- {"Sparrow"},
- {"Patriot"},
- {"Quad"},
- {"Coastguard"},
- {"Dinghy"},
- {"Hermes"},
- {"Sabre"},
- {"Rustler"},
- {"ZR-350"},
- {"Walton"},
- {"Regina"},
- {"Comet"},
- {"BMX"},
- {"Burrito"},
- {"Camper"},
- {"Marquis"},
- {"Baggage"},
- {"Dozer"},
- {"Maverick"},
- {"News Chopper"},
- {"Rancher"},
- {"FBI Rancher"},
- {"Virgo"},
- {"Greenwood"},
- {"Jetmax"},
- {"Hotring"},
- {"Sandking"},
- {"Blista Compact"},
- {"Police Maverick"},
- {"Boxville"},
- {"Benson"},
- {"Mesa"},
- {"RC Goblin"},
- {"Hotring Racer A"},
- {"Hotring Racer B"},
- {"Bloodring Banger"},
- {"Rancher"},
- {"Super GT"},
- {"Elegant"},
- {"Journey"},
- {"Bike"},
- {"Mountain Bike"},
- {"Beagle"},
- {"Cropdust"},
- {"Stunt"},
- {"Tanker"},
- {"Roadtrain"},
- {"Nebula"},
- {"Majestic"},
- {"Buccaneer"},
- {"Shamal"},
- {"Hydra"},
- {"FCR-900"},
- {"NRG-500"},
- {"HPV1000"},
- {"Cement Truck"},
- {"Tow Truck"},
- {"Fortune"},
- {"Cadrona"},
- {"FBI Truck"},
- {"Willard"},
- {"Forklift"},
- {"Tractor"},
- {"Combine"},
- {"Feltzer"},
- {"Remington"},
- {"Slamvan"},
- {"Blade"},
- {"Freight"},
- {"Streak"},
- {"Vortex"},
- {"Vincent"},
- {"Bullet"},
- {"Clover"},
- {"Sadler"},
- {"Firetruck LA"},
- {"Hustler"},
- {"Intruder"},
- {"Primo"},
- {"Cargobob"},
- {"Tampa"},
- {"Sunrise"},
- {"Merit"},
- {"Utility"},
- {"Nevada"},
- {"Yosemite"},
- {"Windsor"},
- {"Monster A"},
- {"Monster B"},
- {"Uranus"},
- {"Jester"},
- {"Sultan"},
- {"Stratum"},
- {"Elegy"},
- {"Raindance"},
- {"RC Tiger"},
- {"Flash"},
- {"Tahoma"},
- {"Savanna"},
- {"Bandito"},
- {"Freight Flat"},
- {"Streak Carriage"},
- {"Kart"},
- {"Mower"},
- {"Duneride"},
- {"Sweeper"},
- {"Broadway"},
- {"Tornado"},
- {"AT-400"},
- {"DFT-30"},
- {"Huntley"},
- {"Stafford"},
- {"BF-400"},
- {"Newsvan"},
- {"Tug"},
- {"Trailer 3"},
- {"Emperor"},
- {"Wayfarer"},
- {"Euros"},
- {"Hotdog"},
- {"Club"},
- {"Freight Carriage"},
- {"Trailer 3"},
- {"Andromada"},
- {"Dodo"},
- {"RC Cam"},
- {"Launch"},
- {"Police Car (LSPD)"},
- {"Police Car (SFPD)"},
- {"Police Car (LVPD)"},
- {"Police Ranger"},
- {"Picador"},
- {"S.W.A.T. Van"},
- {"Alpha"},
- {"Phoenix"},
- {"Glendale"},
- {"Sadler"},
- {"Luggage Trailer A"},
- {"Luggage Trailer B"},
- {"Stair Trailer"},
- {"Boxville"},
- {"Farm Plow"},
- {"Utility Trailer"}
- };
- #pragma tabsize 0
- new gClass[MAX_PLAYERS];
- #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_BRIGHTRED 0xFF0000AA
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_DARKRED 0x660000AA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_BRIGHTRED 0xFF0000AA
- #define COLOR_INDIGO 0x4B00B0AA
- #define COLOR_VIOLET 0x9955DEEE
- #define COLOR_LIGHTRED 0xFF99AADD
- #define COLOR_SEAGREEN 0x00EEADDF
- #define COLOR_GRAYWHITE 0xEEEEFFC4
- #define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
- #define COLOR_GREENISHGOLD 0xCCFFDD56
- #define COLOR_LIGHTBLUEGREEN 0x0FFDD349
- #define COLOR_NEUTRALBLUE 0xABCDEF01
- #define COLOR_LIGHTCYAN 0xAAFFCC33
- #define COLOR_LEMON 0xDDDD2357
- #define COLOR_MEDIUMBLUE 0x63AFF00A
- #define COLOR_NEUTRAL 0xABCDEF97
- #define COLOR_BLACK 0x00000000
- #define COLOR_NEUTRALGREEN 0x81CFAB00
- #define COLOR_DARKGREEN 0x12900BBF
- #define COLOR_LIGHTGREEN 0x24FF0AB9
- #define COLOR_DARKBLUE 0x300FFAAB
- #define COLOR_BLUEGREEN 0x46BBAA00
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_DARKRED 0x660000AA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_PURPLE 0x800080AA
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_RED1 0xFF0000AA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x00FF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BROWN 0x993300AA
- #define COLOR_CYAN 0x99FFFFAA
- #define COLOR_TAN 0xFFFFCCAA
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_KHAKI 0x999900AA
- #define COLOR_LIME 0x99FF00AA
- #define COLOR_SYSTEM 0xEFEFF7AA
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_RED2 0xAA3333AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_WHITE 0xFFFFFFAA
- #else
- main()
- {
- print("\n----------------------------------");
- print(" [BWS]TDM Server Training v2.1");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- SetGameModeText("CW/DM/WW/FC");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 24, 28, 0, 0, 0);//guyspawn
- AddPlayerClass(2, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 24, 28, 0, 0, 0);//guyspawn2
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;[playerid Conneced To BWS Server
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;KillTimer(/Startkt)
- }
- public OnPlayerSpawn(playerid)
- {
- 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("/healme", cmdtext, true, 10) == 0)
- {
- SetPlayerHealth(playerid,100)// Set player hp to 100...
- return 1;
- if (strcmp("/killme", cmdtext, true, 10) == 0)
- {
- SetPlayerHealth(playerid,0)// Set player hp to 0... kill the player
- return 1;
- if (strcmp("/halfLifMe", cmdtext, true, 10) == 0)
- {
- SetPlayerHealth(playerid,50)// Set player hp to 50... half hp
- }
- return 0;
- if (strcmp("/help", cmdtext, true, 5) == 0)
- {
- SendClientMessage(playerid,COLOR_YELLOW)"(INFO) WeLcome to Our Server's Help command.(")
- SendClientMessage(playerid,COLOR_YELLOW)"(INFO) Enjoy play any time.(")
- }
- if (strcmp("/givemonney", cmd, true, ) == 0) (
- new tmp[256],tmp2[256];
- tmp - strtok(cmdtext, idx);
- tmp2- strotk(cmdtext, idx);
- if(!strlen(tmp)) (
- SendClientMessage(playerid, COLOR_BLUE, "Usage: /givemonney [playerid] [amount]");
- return 1;
- }
- if(!strlen(tmp2)) (
- SendClientMessage(playerid, COLOR_BLUE, "Usage: /givemonney [playerid] [amount]");
- new receiver, monney;
- receiver-strval(tmp);
- monney-strval(tmp2);
- if(GetPlayerMonney(playerid) < monney) (
- SendClientMessage(Playerid, COLOR_BLUE, "the amount you typed in is higher than the amount of cash you have."
- return 1;
- new string[128];
- new playername [MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername, sizeof(playername));
- new playername2 [MAX_PLAYER_NAME];
- GetPlayerName(receiver,playername2, sizeof(playername2));
- format (string.sizeof(string), "You receive $&d from &s.",monney,playername);
- SendClientMessage (playerid, COLOR_YELLOW, string);
- format (string.sizeof(string), "You give $&d to &s.",monney,playername2);
- SendClientMessage (playerid, COLOR_YELLOW, string);
- GivePlayerMonney(playerid, (0-monney));
- GivePlayerMonney(receiver, monney);
- return 1;
- if (strcmp("/heal", cmd, true, ) == 0) (
- new tmp[256],tmp2[256];
- tmp - strtok(cmdtext, idx);
- tmp2- strotk(cmdtext, idx);
- if(!strlen(tmp)) (
- SendClientMessage(playerid, COLOR_BLUE, "Usage: /heal [playerid] [amount]");
- return 1;
- }
- if(!strlen(tmp2)) (
- SendClientMessage(playerid, COLOR_BLUE, "Usage: /heal [playerid] [amount]");
- new viotim, health;
- viotim-strval(tmp);
- health-strval(tmp2);
- new Float:Health
- GetPlayerHealth(viotim, Health);
- if (Health ** 100)(
- SendClientMessage(playerid, COLOR_YELLOW,"This person does not require healing.");
- return 1;
- )
- if(health+Bealth)
- new string[128];
- new playername [MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername, sizeof(playername));
- new playername2 [MAX_PLAYER_NAME];
- GetPlayerName(viotim,playername2, sizeof(playername2));
- Format(string, sizeof(string), "&s has healed you.(+&d MP)"), playername,health);
- SendClientMessage(viotim, COLOR_RED, string);
- SetPlayerHealth(viotim, Health+Health);
- Format(string, sizeof(string), "You Has Healed.(+&d MP)"), playername2,health);
- SendClientMessage(playerid, COLOR_RED, string);
- if(health+Bealth)< 100) (
- SetPlayerHealth(Vioctim, 100);
- )
- return 1;
- if (strcmp("/mytp", cmdtext, true, 10) == 0)
- GetPlayerPos(playerid,1404.4426,-845.8065,45.9557);
- SenClientMessage(playerid, COLOR_YELLOW); ("you Have Teleported");
- if(strcmp(cmdtext, "/fireman", true) == 0)
- {
- // Set the player's skin to ID 293, which is a fireman.
- SetPlayerSkin(playerid, 277);//Set player Skin to 293
- return 1;
- if(strcmp(cmd, "/fightstyle", true) == 0) {
- if(logged[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are not logged in.");
- else
- if(logged[playerid] == -2) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are jailed.");
- else
- SendClientMessage(playerid, COLOR_GREEN, "Fighting Styles:");
- SendClientMessage(playerid, COLOR_YELLOW, "/normal, /boxing, /kungfu, /kneehead, /grabkick, /elbow.");
- return 1;
- if(strcmp(cmd, "/rules", true) == 0) {
- if(logged[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are not logged in.");
- else
- if(logged[playerid] == -2) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are jailed.");
- else
- SendClientMessage(playerid, COLOR_YELLOW, "1)No Flaming.");
- SendClientMessage(playerid, COLOR_YELLOW, "2)No Racism.");
- SendClientMessage(playerid, COLOR_YELLOW, "3)Leave Cruises Alone.");
- SendClientMessage(playerid, COLOR_YELLOW, "4)Speak in English in Main chat.Use /pm for non-english.");
- SendClientMessage(playerid, COLOR_YELLOW, "5)Dont Try to cheat in this server.");
- return 1;
- }
- if(!strcmp(cmdtext, "/me ", true, 3))
- {
- if(logged[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are not logged in.");
- else
- if(logged[playerid] == -2) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are jailed.");
- else
- if(!cmdtext[3])return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /me [action]");
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(str, sizeof(str), "**%s %s", str, cmdtext[4]);
- SendClientMessageToAll(GetPlayerColor(playerid), str);
- return 1;
- }
- if(strcmp(cmd, "/announce", true) == 0)
- {
- new length = strlen(cmdtext);
- if(adminlevel[playerid] < 1 ) return 0;
- else
- if(logged[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are not logged in.");
- else
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /announce [text]");
- return 1;
- }
- GameTextForAll(result, 5000, 0);
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- format(string, sizeof(string), "Admin %s has used /announce command", pName);
- SendClientMessageToAdmins(COLOR_WHITE, string);
- return 1;
- }
- if(!strcmp(cmd, "/setskin", true))
- {
- myskin = strtok(cmdtext, idx);
- if (!strlen(myskin)){
- return 1;
- }
- if ((strval(myskin) < 0) || (strval(myskin) > 299) || IsInvalidSkin(strval(myskin)))
- return SendClientMessage(playerid, COLOR_BRIGHTRED, "Invalid Skin");
- SetPlayerSkin(playerid, strval(myskin));
- skin[playerid] = 1;
- return 1;
- }
- if(strcmp("/pm", cmd, true) == 0)
- {
- new gMessage[256];
- new tmp[256];
- new Message[256];
- new pName[MAX_PLAYER_NAME+1];
- new iName[MAX_PLAYER_NAME+1];
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp) || strlen(tmp) > 5) {
- SendClientMessage(playerid,COLOR_WHITE,"USAGE: /pm [id] [message]");
- return 1;
- }
- new id = strval(tmp);
- gMessage = strrest(cmdtext,idx);
- if(!strlen(gMessage)) {
- SendClientMessage(playerid,COLOR_WHITE,"USAGE: /pm [id] [message]");
- return 1;
- }
- if(!IsPlayerConnected(id)) {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR:Player is not Connected");
- return 1;
- }
- if(playerid != id) {
- GetPlayerName(id,iName,sizeof(iName));
- GetPlayerName(playerid,pName,sizeof(pName));
- format(Message,sizeof(Message),"PM sent to %s(ID:%d): %s",iName,id,gMessage);
- SendClientMessage(playerid,PM_OUTGOING_COLOR,Message);
- format(Message,sizeof(Message),"**PM from %s(ID:%d): %s",pName,playerid,gMessage);
- SendClientMessage(id,PM_INCOMING_COLOR,Message);
- PlayerPlaySound(id,1085,0.0,0.0,0.0);
- printf("PM: %s",Message);
- format(string, sizeof(string), "PM from %s to %s was: %s", pName, iName, gMessage);
- SendClientMessageToAdmins(COLOR_WHITE, string);
- }
- else {
- SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot PM yourself");
- }
- return 1;
- my error
- C:\Documents and Settings\Administrateur\Bureau\pastebin.comFDXX6V0N\pawno\new.pwn(337) : warning 225: unreachable code
- C:\Documents and Settings\Administrateur\Bureau\pastebin.comFDXX6V0N\pawno\new.pwn(337) : error 029: invalid expression, assumed zero
- C:\Documents and Settings\Administrateur\Bureau\pastebin.comFDXX6V0N\pawno\new.pwn(337) : warning 215: expression has no effect
- C:\Documents and Settings\Administrateur\Bureau\pastebin.comFDXX6V0N\pawno\new.pwn(337) : error 001: expected token: ";", but found "-identifier-"
- C:\Documents and Settings\Administrateur\Bureau\pastebin.comFDXX6V0N\pawno\new.pwn(337) : error 017: undefined symbol "Conneced"
- C:\Documents and Settings\Administrateur\Bureau\pastebin.comFDXX6V0N\pawno\new.pwn(337) : fatal error 107: too many error messages on one line
- Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
- 4 Errors.
Advertisement
Add Comment
Please, Sign In to add comment