19.11.2011, 22:28
Hello I have a problem and I want to help me.
We introduced Gangs War and I encountered a problem. The system is made to form teams based on the skins
ex: If I took a skin of Vagos I am in Vagos team.
I want to change to form teams based on [pLeader] / [pMember]
A part of the script that I would like to exchange:
In the script above you can see that teams are made with "gTeam" I want to change to be with [pLeader] / [pMember].
Please help me.
I'm sorry for my bad English
We introduced Gangs War and I encountered a problem. The system is made to form teams based on the skins
ex: If I took a skin of Vagos I am in Vagos team.
I want to change to form teams based on [pLeader] / [pMember]
A part of the script that I would like to exchange:
Код:
new Float:x, Float:y, Float:z; if (killerid == INVALID_PLAYER_ID) { SendDeathMessage( INVALID_PLAYER_ID, playerid, reason ); SetPlayerWantedLevel( playerid, 0 ); TeamInfo[ gTeam[playerid] ][ HomiesDied ]++; TeamInfo[ gTeam[playerid] ][ TeamScore ]--; } else { SendDeathMessage( killerid, playerid, reason ); #if DROP_WEAPONS if (!GetPlayerInterior(playerid) && !IsPlayerInAnyVehicle(playerid)) DropPlayerWeapons(playerid); #endif if (gTeam[ killerid ] != gTeam[ playerid ]) // Valid kill { SetPlayerScore( killerid, GetPlayerScore( killerid ) +1 ); GivePlayerMoney( killerid, 500 ); SetPlayerWantedLevel( killerid, GetPlayerWantedLevel( killerid )+1 ); TeamInfo[ gTeam[killerid] ][ RivalsKilled ]++; TeamInfo[ gTeam[playerid] ][ HomiesDied ]++; TeamInfo[ gTeam[killerid] ][ TeamScore ]++; TeamInfo[ gTeam[playerid] ][ TeamScore ]--; //----------------------------- player was killed in a turf? ------------------- GetPlayerPos(playerid, x, y, z); GetPlayerPos(killerid, x, y, z); for (new i = 0; i < MAX_TURFS; i++) { if (IsPlayerInTurf(playerid, turfs[i][zMinX], turfs[i][zMinY], turfs[i][zMaxX], turfs[i][zMaxY]) && IsPlayerInTurf(killerid, turfs[i][zMinX], turfs[i][zMinY], turfs[i][zMaxX], turfs[i][zMaxY]) ) { if (turfs[ i ][ TurfWarStarted ] != 1 && !IsPlayerInAnyVehicle(killerid)) { TurfInfo[ i ][ gTeam[killerid] ][ TurfKills ]++; if (TurfInfo[ i ][ gTeam[killerid] ][ TurfKills ] == ATTACK_KILLS) { if (turfs[ i ][ TurfOwner ] == gTeam[killerid]) { for (new a=0; a<MAX_TEAMS; a++) { TurfInfo[ i ][ a ][ TurfKills ] =0; } return 1; } turfs[ i ][ TurfAttacker ] = gTeam[killerid]; for (new b=0; b<MAX_PLAYERS; b++) { if (gTeam[ b ] == turfs[ i ][ TurfAttacker ]) { new msg1[ 256 ]; format(msg1,sizeof(msg1), "~w~We have provoked a turfwar ~w~in ~y~%s ~w~against the ~r~%s", turfs[ i ][ turfName ], TeamInfo[ turfs[ i ][ TurfOwner ] ][ TeamName ]); new Text:txt1 = TextDrawCreate( 200.0, 385.0, msg1 ); TextDrawFont( txt1, 0 ); TextDrawSetShadow( txt1, 0 ); TextDrawSetOutline( txt1, 1 ); TextDrawColor( txt1, 0xDFDFDFFF ); TimeTextForPlayer( b, txt1, 6000 ); GangZoneFlashForPlayer( b, turfs[ i ][turfID], COLOR_FLASH ); } else if (gTeam[b] == turfs[ i ][ TurfOwner ]) { new msg2[ 256 ]; format(msg2,sizeof(msg2), "~r~The ~y~%s ~r~have attacked our turf in ~y~%s!", TeamInfo[ turfs[ i ][ TurfAttacker ] ][ TeamName ], turfs[ i ][ turfName ]); new Text:txt2 = TextDrawCreate( 200.0, 370.0, msg2 ); TextDrawFont( txt2, 0 ); TextDrawSetShadow( txt2, 0 ); TextDrawSetOutline( txt2, 1 ); TextDrawColor( txt2, COLOR_RED ); TimeTextForPlayer( b, txt2, 6000 ); GangZoneFlashForPlayer( b, turfs[ i ][turfID], COLOR_FLASH ); } else GangZoneFlashForPlayer( b, turfs[ i ][turfID], COLOR_FLASH2 ); } SetTimerEx("EndWar", ATTACK_TIME, false ,"iii", i, turfs[ i ][ TurfAttacker ], turfs[ i ][ TurfOwner ] ); turfs[ i ][ TurfWarStarted ] =1; for(new c=0; c<MAX_TEAMS; c++) { TurfInfo[ i ][ c ][ TurfKills ] =0; TurfInfo[ i ][ c ][ TurfAttackKills ] =0; } return 1; } } else if (turfs[ i ][ TurfWarStarted ] == 1 && !IsPlayerInAnyVehicle(killerid) && (turfs[ i ][ TurfAttacker ] == gTeam[killerid]) || turfs[ i ][ TurfOwner ] == gTeam[killerid]) { TurfInfo[ i ][ gTeam[killerid] ][ TurfAttackKills ]++; } } } } }
Please help me.
I'm sorry for my bad English