Turfs help. (Rep+) -
Re: Turfs help. (Rep+) -
PS the script works perfectly fine if you start the turfwar in grove street.
Re: Turfs help. (Rep+) -
Re: Turfs help. (Rep+) -
Код:
if(strcmp("/takeover", cmdtext, true) == 0)
//turf
{
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
new Float:x9, Float:y9, Float:z9;
GetPlayerPos(playerid, x9, y9, z9);
for (new i = 0; i < MAX_TURFS; i++)
{
if (IsPlayerInTurf(playerid, turfs[i][zMinX], turfs[i][zMinY], turfs[i][zMaxX], turfs[i][zMaxY]))
{
if (turfwar == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "A turf war has already started!");
return 1;
}
if (turfs[ i ][ TurfOwner ] == gTeam[playerid])
{
SendClientMessage(playerid, COLOR_WHITE, "You already own this turf!");
return 1;
}
SetTimerEx("RunTurf",2000,0,"ii",i,playerid);
runcheck[playerid] = 1;
tookover[playerid] = 1;
turfs[ i ][ TurfWarStarted ] =War;
SetTimerEx("DeterminWinner", ATTACK_TIME, false ,"ii", i, turfs[ i ][ TurfOwner ] );
turfwar = 1;
format(string, 128, "%s Started a TurfWar at %s", sendername,turfs[ i ][ turfName ]);
SendClientMessageToAll(COLOR_RED, string);
SendClientMessage(playerid,ORANGE, "You have taken over the turf");
GangZoneFlashForAll(turfs[ i ][turfID], 0xFF000080 );
}
else SendClientMessage(playerid,PURPLE, "You are not in a turf");
}
return 1;
}
Re: Turfs help. (Rep+) -
Wait.. i found what's wrong with it -_-. Ignore this thread guys