01.01.2011, 20:05
pawn Код:
#define PlayerPolicial 191
#define PlayerBandido 171
new gBandidos, gPolicia;
new gTeam[MAX_PLAYERS];
onplayerconnect(playerid)
{
gTeam[playerid] = 0;
}
ongamemodeint()
{
gBandidos = GangZoneCreate(1283.7197,-2061.5576,1105.7473,-1995.7424);
gPolicia = GangZoneCreate(1283.7197,-2061.5576,1105.7473,-1995.7424);
}
/*
* :P
*/
if(gTeam[playerid] == PlayerPolicial)
{
GangZoneShowForPlayer(playerid, gBandidos, COR_BANDIDO);
}
else if(gTeam[playerid] == PlayerBandido)
{
GangZoneShowForPlayer(playerid, gPolicia, COR_POLICIA);
}
onplayercommandtext(){
if (strcmp("/polico", cmdtext, true, 10) == 0)
{
gTeam[playerid] = PlayerPolicial;
//vc й um policial a partir desse momento.
return 1;
}
if (strcmp("/vagabundo", cmdtext, true, 10) == 0)
{
gTeam[playerid] = PlayerBandido;
//vc й um Bandido a partir desse momento.
return 1;
}
if (strcmp("/dominar", cmdtext, true, 10) == 0)
{
if(IsPlayerInPlace(playerid,2239.024,-1721.339, 2512.828, -1638.437))
{
linha 1082 -> if(gTeam[playerid] == PlayerPolicial)
{
GangZoneFlashForAll(gBandidos,COR_POLICIA);
SetTimer("DominarPoliciaBandidos",60000,false);
}
linha 1807 ->else if(gTeam[playerid] == PlayerBandido)
{
GangZoneFlashForAll(gBandidos,COR_BANDIDOS);
SetTimer("DominarBandidosBandidos",60000,false);
}
}
else if(IsPlayerInPlace(playerid,2282.1401,2425.7576,3.4692,357.7160))
{
linha 1095 -> if(gTeam[playerid] == PlayerPolicial)
{
GangZoneFlashForAll(gBandidos,COR_POLICIA);
SetTimer("DominarPoliciaPolicia",60000,false);
}
linha 1100 -> else if(gTeam[playerid] == PlayerBandido)
{
GangZoneFlashForAll(gBandidos,COR_BANDIDOS);
SetTimer("DominarBandidosPolicia",60000,false);
}
}
return 1;
}
}