Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new gTeam[MAX_PLAYERS];
- #define GREEN 0
- #define BLUE 1
- #define TEAM_GREEN_COLOR 0x77CC77FF
- #define TEAM_BLUE_COLOR 0x7777DDFF
- forward SetPlayerToTeamColor(playerid);
- forward PickUp(playerid);
- new GOTP = 0;
- new pizza1;
- new pizza2;
- new pizza3;
- new pizza4;
- new pizza5;
- public OnGameModeInit()
- {
- SetGameModeText("THE PIZZA!");
- AddPlayerClass(104,2063.6157,-1585.3534,13.4818,269.6799,31,1000000,24,1000000,-1,-1);
- AddPlayerClass(102,2076.4358,-1586.9498,13.4838,90.4516,27,1000000,24,1000000,-1,-1);
- AddPlayerClass(155,2104.1987,-1810.7928,13.5547,87.6317,30,1000000,29,1000000,-1,-1);
- AddPlayerClass(167,2104.4573,-1803.9337,13.5547,91.0221,34,1000000,25,1000000,-1,-1);
- pizza1 = CreateObject(1582, 2102.0610351563, -1793.1125488281, 13.318605422974, 0, 0, 0);
- pizza2 = CreateObject(1582, 2103.9296875, -1800.4904785156, 13.318605422974, 0, 0, 0);
- pizza3 = CreateObject(1582, 2104.0625, -1812.4545898438, 13.318605422974, 0, 0, 0);
- pizza4 = CreateObject(1582, 2103.3754882813, -1817.2326660156, 13.318605422974, 0, 0, 0);
- pizza5 = CreateObject(1582, 2102.1044921875, -1819.9056396484, 13.318605422974, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
- SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
- SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
- SetPlayerFacingAngle(playerid,0.0);
- if(classid == 0 || classid == 1)
- {
- gTeam[playerid] = GREEN;
- GameTextForPlayer(playerid,"~g~GREEN TEAM",2000,3);
- }
- else if(classid == 2 || classid == 3)
- {
- gTeam[playerid] = BLUE;
- GameTextForPlayer(playerid,"~b~BLUE TEAM",2000,3);
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- 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[])
- {
- return 1;
- }
- 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 PickUp(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 14.0, 2102.0610351563, -1793.1125488281, 13.318605422974))
- {
- if(gTeam[playerid] == GREEN)
- {
- SendClientMessage(playerid, 0xFFFF0000, "u have the pizza");
- }
- }
- }
- public SetPlayerToTeamColor(playerid)
- {
- if(gTeam[playerid] == GREEN) {
- SetPlayerColor(playerid,TEAM_GREEN_COLOR); // green
- } else if(gTeam[playerid] == BLUE) {
- SetPlayerColor(playerid,TEAM_BLUE_COLOR); // blue
- }
- }
Add Comment
Please, Sign In to add comment