Get killer team colo
#1

Hello,I need to code that system get killer team color.

I scripted like this
Код:
// Team info
enum teaminfo
{
	 TeamColor,
}
// Script to get killerid team color
new killerteamcolor;
killerteamcolor = killerid [TeamColor];
Errors:
Код:
C:\Users\bendra\Desktop\GangWarsServer\gamemodes\xLSTW.pwn(2201) : error 028: invalid subscript (not an array or too many subscripts): "killerid"
C:\Users\bendra\Desktop\GangWarsServer\gamemodes\xLSTW.pwn(2201) : warning 215: expression has no effect
C:\Users\bendra\Desktop\GangWarsServer\gamemodes\xLSTW.pwn(2201) : error 001: expected token: ";", but found "]"
C:\Users\bendra\Desktop\GangWarsServer\gamemodes\xLSTW.pwn(2201) : error 029: invalid expression, assumed zero
C:\Users\bendra\Desktop\GangWarsServer\gamemodes\xLSTW.pwn(2201) : fatal error 107: too many error messages on one line
Please help
Reply
#2

Well
pawn Код:
public OnPlayerDeath( playerid, killerid, reason )
{
    new color = GetPlayerColor( killerid );
    SendClientMessage( playerid, color, "This is killer's color" );
    return 1;
}
Is that what are you trying to do?
Reply
#3

hmmm.. propobly.I want to make that turf would flash with attacker color.It look like:
Код:
                                if (gTeam[ b ] == turfs[ i ][ TurfAttacker ]) {
                                      new color = GetPlayerColor( killerid );
                                      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 );
                                }
                                else if (gTeam[b] == turfs[ i ][ TurfOwner ]) {
                                      new msg2[ 256 ];
	                                  format(msg2,sizeof(msg2), "~r~The ~y~%s ~r~have attacked our turf!",
									  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], TeamColor );
                                }
                                else { GangZoneFlashForPlayer( b, turfs[ i ][turfID], TeamColor ); }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)