public OnGameModeInit()
{
SetGameModeText("America Vs UK V1.5");
// America
AddPlayerClass(286,1522.6503,-806.6635,72.1700,97.8118,29,500,33,500,24,320);
// United Kingdom
AddPlayerClass(269,1279.3276,-778.4965,95.9663,83.8298,29,500,34,280,23,450);
return 1;
}
#endif
new gTeam[MAX_PLAYERS];
public OnGameModeInit()
{
SetGameModeText("America Vs UK V1.5");
// America
AddPlayerClass(286,1522.6503,-806.6635,72.1700,97.8118,29,500,33,500,24,320);
// United Kingdom
AddPlayerClass(269,1279.3276,-778.4965,95.9663,83.8298,29,500,34,280,23,450);
return 1;
}
//________________________________//
//__________TEAM DEFINES__________//
#define TEAM_AMERICA 0//__________//
#define TEAM_UK 1//______________//
//_______________________________//
#define AMERICASPAWN "1522.6503,-806.6635,72.1700"
#define UKSPAWN "1279.3276,-778.4965,95.9663"
#define AMERICACOLOR "COLOR_BLUE"
#define UKCOLOR "COLOR_RED"
//_________________________________//
//____________COLORS_______________//
#define COLOR_BLUE 0x0000FFFF//____//
#define COLOR_RED 0xFF0000AA//_____//
#define COLOR_GREEN 0x008000FF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_BRIGHTRED 0xFF000AAA
#define COLOR_AQUA 0x00FFFFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_BEIGE 0xFFF8DCAA
#define COLOR_BLACK 0x000000AA
#define COLOR_LIGHTERBLUE 0x00BFFFAA
#define COLOR_BLUELIGHT 0x1E90FFAA
#define COLOR_BLUEMEDIUM 0x0000CDAA
#define COLOR_BLUEDARK 0x00008BAA
#define COLOR_PINK 0xFF1493AA
#define COLOR_PINKDARK 0xFF00FFAA
#define COLOR_GREENLIGHT 0x00FF00AA
#define COLOR_GREENDARK 0x006400AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OKER 0x808000AA
#define COLOR_ORANGE 0xFF4500AA
#define COLOR_ORANGELIGHT 0xFF8C00AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_VIOLETDARK 0x9400D3AA
#define COLOR_INDIGO 0xAB0082AA
#define COLOR_RED 0xFF0000AA
#define COLOR_SAND 0xFFDEADAA
#define COLOR_SILVER 0xC0C0C0AA
#define COLOR_TEAL 0x008080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GOLD 0xFFD700AA
#define COLOR_BROWN 0x8B4513AA
#define COLOR_BROWNLIGHT 0xA0522DAA
#define COLOR_GRAY 0xA9A9A9AA
#define COLOR_GRAYDARK 0x696969AA
#define COLOR_INVISIBLE 0xFFFFFF00
#define COLOR_INDIA 0x80000096
#define COLOR_PAKISTAN 0x40808096
#define COLOR_NEPAL 0x8000FF96
#define COLOR_BRAZIL 0xB7B70096
#define COLOR_CHINA 0x80808096
#define COLOR_GREECE 0x00000096
#define COLOR_SINGAPORE 0x00FFFF96
#define COLOR_IRAQ 0x8080C096
public OnPlayerRequestClass(playerid, classid)
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
gTeam[playerid] = TEAM_AMERICA;
GameTextForPlayer(playerid, "~b~America", 5000, 5);
SetPlayerPos(playerid, 1522.6503,-806.6635,72.1700);
SetPlayerFacingAngle(playerid, 4018);
SetPlayerCameraPos(playerid, 1514.0861,-806.9355,72.0768);
SetPlayerCameraLookAt(playerid, 1522.6503,-806.6635,72.1700);
}
case 1:
{
gTeam[playerid] = TEAM_UK;
GameTextForPlayer(playerid, "~g~UK", 5000, 5);
SetPlayerPos(playerid, 1279.3276,-778.4965,95.9663);
SetPlayerFacingAngle(playerid,8298);
SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665);
SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663);
}
}
SetPlayerToTeamColour(playerid); // calls the custom function
{
}
return 1;
}
SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == TEAM_AMERICA)
{
SetPlayerColor(playerid,COLOR_BLUE);
}
else if(gTeam[playerid] == TEAM_UK)
{
SetPlayerColor(playerid,COLOR_RED);
}
}
// 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(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
//_________________________________//
//____________COLORS_______________//
#define COLOR_BLUE 0x0000FFFF//____//
#define COLOR_RED 0xFF0000AA//_____//
#define COLOR_GREEN 0x008000FF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_BRIGHTRED 0xFF000AAA
#define COLOR_AQUA 0x00FFFFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_BEIGE 0xFFF8DCAA
#define COLOR_BLACK 0x000000AA
#define COLOR_LIGHTERBLUE 0x00BFFFAA
#define COLOR_BLUELIGHT 0x1E90FFAA
#define COLOR_BLUEMEDIUM 0x0000CDAA
#define COLOR_BLUEDARK 0x00008BAA
#define COLOR_PINK 0xFF1493AA
#define COLOR_PINKDARK 0xFF00FFAA
#define COLOR_GREENLIGHT 0x00FF00AA
#define COLOR_GREENDARK 0x006400AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OKER 0x808000AA
#define COLOR_ORANGE 0xFF4500AA
#define COLOR_ORANGELIGHT 0xFF8C00AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_VIOLETDARK 0x9400D3AA
#define COLOR_INDIGO 0xAB0082AA
#define COLOR_RED 0xFF0000AA
#define COLOR_SAND 0xFFDEADAA
#define COLOR_SILVER 0xC0C0C0AA
#define COLOR_TEAL 0x008080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GOLD 0xFFD700AA
#define COLOR_BROWN 0x8B4513AA
#define COLOR_BROWNLIGHT 0xA0522DAA
#define COLOR_GRAY 0xA9A9A9AA
#define COLOR_GRAYDARK 0x696969AA
#define COLOR_INVISIBLE 0xFFFFFF00
#define COLOR_INDIA 0x80000096
#define COLOR_PAKISTAN 0x40808096
#define COLOR_NEPAL 0x8000FF96
#define COLOR_BRAZIL 0xB7B70096
#define COLOR_CHINA 0x80808096
#define COLOR_GREECE 0x00000096
#define COLOR_SINGAPORE 0x00FFFF96
#define COLOR_IRAQ 0x8080C096
//________________________________//
//__________TEAM DEFINES__________//
#define TEAM_AMERICA 0//__________//
#define TEAM_UK 1//______________//
//_______________________________//
#define AMERICASPAWN "1522.6503,-806.6635,72.1700"
#define UKSPAWN "1279.3276,-778.4965,95.9663"
#define AMERICACOLOR "COLOR_BLUE"
#define UKCOLOR "COLOR_RED"
main()
{
print("\n----------------------------------");
print("America Vs UK V1.5");
print("----------------------------------\n");
}
#endif
new America;
new UK;
new gTeam[MAX_PLAYERS];
public OnGameModeInit()
{
SetGameModeText("America Vs UK V1.5");
// America
AddPlayerClass(286,1522.6503,-806.6635,72.1700,97.8118,29,500,33,500,24,320);
// United Kingdom
AddPlayerClass(269,1279.3276,-778.4965,95.9663,83.8298,29,500,34,280,23,450);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
gTeam[playerid] = TEAM_AMERICA;
GameTextForPlayer(playerid, "~b~America", 5000, 5);
SetPlayerPos(playerid, 1522.6503,-806.6635,72.1700);
SetPlayerFacingAngle(playerid, 4018);
SetPlayerCameraPos(playerid, 1514.0861,-806.9355,72.0768);
SetPlayerCameraLookAt(playerid, 1522.6503,-806.6635,72.1700);
}
case 1:
{
gTeam[playerid] = TEAM_UK;
GameTextForPlayer(playerid, "~g~UK", 5000, 5);
SetPlayerPos(playerid, 1279.3276,-778.4965,95.9663);
SetPlayerFacingAngle(playerid,8298);
SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665);
SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663);
}
}
SetPlayerToTeamColour(playerid); // calls the custom function
{
}
return 1;
}
SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == TEAM_AMERICA)
{
SetPlayerColor(playerid,COLOR_BLUE);
}
else if(gTeam[playerid] == TEAM_UK)
{
SetPlayerColor(playerid,COLOR_RED);
}
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, COLOR_GREEN,"Welcome To America Vs UK TDM Server");
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;
}
Yes i did i wanted players to learn more easily so that they know how to script team
|
SendClientMessage(playerid, -1, "Test");
are you mad i explained everything line by line and you are saying i did not do anything this is for the guys who knows
how to add the classes setplayerpos and setplayerfacing angle i gave those tutorial so newbies knows how to script the basic so they understand my tutorial you did not see anything |
You didn't explain each parts, i wouldn't called this tutorial. a tutorial has explanation. Each line in the code must have explanation. |