07.11.2014, 22:19
Quote:
Please consider checking the comments after each code explaining each part of the stocks before posting unuseful comments
Your Team_Stuff define won't be defined by me, this is a part of a TDM basics (more than 2 teams based) If you don't even know how to define teams, then it's your problem, this tutorial is dedicated for helping tdm gamemodes scripters. |
pawn Code:
stock ShowZone(zoneid) //the function for showing zones
{
switch(tCP[zoneid]) //checking the team controlling a zone then applying the zone color
{
case TEAM_NOTHING: GangZoneShowForAll(Zone[zoneid], -66);
case TEAM_AFRICA: GangZoneShowForAll(Zone[zoneid], 0xFF9900AA);
case TEAM_AUSTRALIA: GangZoneShowForAll(Zone[zoneid], 0x9400D3AA);
case TEAM_AMERICA: GangZoneShowForAll(Zone[zoneid], 0x0000BBAA);
case TEAM_EUROPE: GangZoneShowForAll(Zone[zoneid], 0x15FF0055);
case TEAM_ASIA: GangZoneShowForAll(Zone[zoneid], 0xFF000090);
}
}
pawn Code:
stock ShowZone(zoneid) //the function for showing zones
{
switch(tCP[zoneid]) //checking the team controlling a zone then applying the zone color
{
case TEAM_AFRICA: GangZoneShowForAll(Zone[zoneid], 0xFF9900AA);//CHANGE TO YOUR TEAM HERE
}
}
Also you barely explained something there! [Except the new and define]
also this!
pawn Code:
switch(PlayerInfo[playerid][Vip]) // (OPTIONAL: Reducing capture timer if a player is VIP)
{
case 0: //VIP level 0
{
ZUpdateTimer[zoneid] = SetTimerEx("ZUpdate", 1000, 1, "di", playerid, zoneid); // 1000*25 = 25000 milliseconds = 25 seconds
SendClientMessage(playerid, 0xFFFFFFFF,"| Stay in this checkpoint for 25 seconds to capture this zone. |");
}
case 1:
{
ZUpdateTimer[zoneid] = SetTimerEx("ZUpdate", 800, 1, "di", playerid, zoneid); // 800*25 = 20000 milliseconds = 20 seconds
SendClientMessage(playerid, 0xFFFFFFFF,"| Stay in this checkpoint for 20 seconds to capture this zone. |");
}
case 2:
{
ZUpdateTimer[zoneid] = SetTimerEx("ZUpdate", 600, 1, "di", playerid, zoneid); // 600*25 = 15000 milliseconds = 15 seconds
SendClientMessage(playerid, 0xFFFFFFFF,"| Stay in this checkpoint for 15 seconds to capture this zone. |");
}
case 3:
{
ZUpdateTimer[zoneid] = SetTimerEx("ZUpdate", 400, 1, "di", playerid, zoneid); // 400*25 = 10000 milliseconds = 10 seconds
SendClientMessage(playerid, 0xFFFFFFFF,"| Stay in this checkpoint for 10 seconds to capture this zone. |");
}
}