01.03.2015, 13:21
(
Последний раз редактировалось Kapersky™; 21.08.2015 в 17:05.
Причина: Available on GitHub.
)

[CVT] Cops vs. Terrorist [Base script for beginners] - MySQL.
I was working on a project with iSkyline, but since, I declined that project and he left, so I thought to release this GM.
About:
A basic CVT gamemode, literally a base for newbies. This script can be the base of a very good TDM server, I (and iSkyline) prepared this for a project. But, then I declined that project, and then I thought to release it. So, I'm contributing this gamemode, to SA-MP community, enjoy! I hope, people will use it.
Screenshots:
mSelection (Skin):


Custom mapped Area 69. (You would love it).

Sorry, I can't upload more screenshot. Reasons are, I've un-installed SA-MP, these are clicked by my friend, I would be very happy, if anybody could contribute some screenshots, no-offense.
Features:
- Admin system
- Register system
- Login system
- MySQL based GM
- Unique classes
- Custom Area 69
- Team selector & Team balancer
- Some basic commands
- Pm system
- Ask system
- Admin help system
- Textdraws
- Spawn protection
- Anti-TeamKill (Unique)
- Skin selection (mSelection).
- Intro TD's
- And many more..
Anti-Spawn Kill:
Код:
if(!response) //If choosen 'Terrorists'
{
pInfo[playerid][Team] = 2;
SendClientMessage( playerid, COLOR_RED, "You have spawned as a terrorist. You have an anti-spawn protection for ten seconds!");
GameTextForPlayer( playerid, "~b~Terrorists", 3000, 3 );
new Random = random(sizeof(RandomTerroristSpawn));
SetPlayerPos( playerid, RandomTerroristSpawn[Random][0], RandomTerroristSpawn[Random][1], RandomTerroristSpawn[Random][2]);
SetPlayerFacingAngle( playerid, RandomTerroristSpawn[Random][3]);
SetPlayerColor(playerid, COLOR_RED);
}
if(response) //If choosen 'Cops'
{
pInfo[playerid][Team] = 1;
SendClientMessage( playerid, COLOR_BLUE, "You have spawned as a cop. You have an anti-spawn protection for ten seconds!");
GameTextForPlayer( playerid, "~b~Cops", 3000, 3 );
new Random = random(sizeof(RandomArmySpawn));
SetPlayerPos( playerid, RandomArmySpawn[Random][0], RandomArmySpawn[Random][1], RandomArmySpawn[Random][2]);
SetPlayerFacingAngle( playerid, RandomArmySpawn[Random][3]);
SetPlayerColor(playerid, COLOR_BLUE);
}
SkinSelectionPerTeam(playerid);
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(GetPlayerTeamEx(playerid) == GetPlayerTeamEx(issuerid))
{
gHealth[playerid] -= amount;
SendClientMessage(issuerid, COLOR_RED, "!- Stop teamkilling! You have been given the same damage recieved by the player!");
return 0;
}
}
gHealth[playerid] -= amount;
return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
if(playerid != INVALID_PLAYER_ID)
{
if(gAntiSpawnProtected { damagedid } == true)
{
SendClientMessage(playerid, COLOR_RED, "[MSG]: The player you are trying to kill is on anti-spawn kill protection.");
return 0;
}
}
return 1;
}
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == BULLET_HIT_TYPE_VEHICLE)
{
foreach(Player,i)
{
if(GetPlayerVehicleID(i) == hitid && GetPlayerVehicleSeat(i) == 1 && GetPlayerTeamEx(i) == GetPlayerTeamEx(playerid))
{
SendClientMessage(playerid, COLOR_RED, "!- Stop shooting your team-mate's vehicle!");
return 0;
}
}
}
return 1;
}
http://pastebin.com/yCReKHtj - It was too long, so..

Well; I'm too lazy to post more, xD. Check it out on your own.
Credits:
Me - For creating this shit.
Kye - For creating SA-MP.
Zeex - For ZCMD.
Incognito - For streamer plugin.
BlueG - MySQL plugin.
iSkyline - For everything he did for me.
*emotional*): The original creator and my ultimate helper.Sorry, if I forgot somebody! (Credits to everybody! good now! xD)
Download:
Pastebin - PWN
Full package - Windows
Mirrors are welcomed.
Do whatever you want to do with it, re-release it, distribute it. (Full permission). Enjoy!


