23.02.2014, 09:09
Hi, i was scripting today. I was scripting the Onplayerrequestclass and i got groves for ballas and ballas for groves. Can u help me plz?
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define Groves 1
#define Ballas 2
#define GrovesColor 0xFF0000AA
#define BallasColor 0x0015FFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_RED 0xAA3333AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_WHITE 0xFFFFFFAA
#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 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#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
#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(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
SetGameModeText("Gang Wars");
AddPlayerClass(102,1999.8440,-1114.8013,27.1318,180.2687,24,1000,31,1000,18,10); // ballasspawn2
AddPlayerClass(103,1999.8440,-1114.8013,27.1318,180.2687,22,1000,30,1000,18,10); // ballasspawn2
AddPlayerClass(104,1999.8440,-1114.8013,27.1318,180.2687,28,1000,27,1000,18,10); // ballasspawn2
AddStaticVehicle(412,2497.9451,-1656.5133,13.1202,88.9524,37,1); // voodoo
AddStaticVehicle(412,2479.4458,-1656.2876,13.0605,89.0820,30,96); // voodoo2
AddStaticVehicle(567,2489.5142,-1656.3590,13.2281,89.2885,114,1); // savanna
AddStaticVehicle(567,2487.0142,-1685.3911,13.3795,87.9845,99,81); // savanna2
AddStaticVehicle(567,2473.2456,-1694.5823,13.3907,179.5584,93,64); // savanna3
AddStaticVehicle(492,2509.1008,-1674.9181,13.2020,345.2656,24,55); // greenwood
AddPlayerClass(105,2495.1643,-1685.5836,13.5124,4.0500,24,1000,30,1000,16,10); // grovespawn
AddPlayerClass(106,2495.1643,-1685.5836,13.5124,4.0500,22,1000,31,1000,16,10); // grovespawn
AddPlayerClass(107,2495.1643,-1685.5836,13.5124,4.0500,9,1,27,1000,16,10); // grovespawn
AddStaticVehicle(421,1991.4319,-1128.5791,25.6153,90.0245,75,1); // tahoma
AddStaticVehicle(566,1990.5372,-1127.7649,25.5338,90.3473,83,1); // tahoma
AddStaticVehicle(566,2011.0507,-1128.5411,24.9827,88.7661,52,8); // tahoma2
AddStaticVehicle(566,2023.2242,-1128.8699,24.6300,87.9971,95,1); // tahoma3
AddStaticVehicle(517,2009.8750,-1093.5736,24.5454,159.9914,54,75); // majestic
AddStaticVehicle(517,2004.5602,-1091.6044,24.5641,163.4946,37,36); // majestic2
AddStaticVehicle(517,2014.5543,-1095.0795,24.5368,160.6653,51,72); // majestic3
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
/* OnPlayerSpawn */
if(GetPlayerTeam(playerid) == Groves)
{
SetPlayerColor(playerid, COLOR_GREEN); // Set his color to CopsColor (BLUE)
/* Any other bonus you want for Cops team! A special gun, skin, color, attachedobject, A random spawn! */
}
else if(GetPlayerTeam(playerid) == Ballas)
{
SetPlayerColor(playerid, COLOR_PINK); // Same as above but in this case, CriminalsColor (RED)
}
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("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
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;
}
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 1:
{
SetPlayerTeam(playerid, Groves);
GameTextForPlayer(playerid, "~g~Grove Street", 1000, 3);
}
case 2:
{
SetPlayerTeam(playerid, Ballas);
GameTextForPlayer(playerid, "~p~Glen Park Ballas", 1000, 3);
}
}
return 1;
}