OnPlayerDeath text draw help
#1

Ok so my topic got deleted. Good for me as i can review what has been done so far.

Now the current problem is that the text daw is not showing up at all with your code Killa_.
I am not using a timer anymore Killa_
This is what i have so far:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	new String[128];
	SendDeathMessage(killerid, playerid, reason);
  DisablePlayerCheckpoint(playerid);
  gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
	SetPlayerColor(playerid,COLOR_GREY);

	if(killerid != INVALID_PLAYER_ID)
  	{
     if(playerid != INVALID_PLAYER_ID && gTeam[killerid] == gTeam[playerid])
     	{
       format(String,sizeof(String),"[KICKED] Team Killer From Team %d",gTeam[killerid]);
       SendClientMessageToAll(red,String);
       return Kick(killerid);
     	}
			switch(gTeam[killerid])
     	{
       case TEAM_HYDRA: {SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); TicketsDeff--;}
       case TEAM_HYDRA2: {SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); TicketsAtt--;}
     	}

      new String5[128];
			TextDrawHideForAll(TicketsDefenders);
      TextDrawSetString(TicketsDefenders, String5);
			format(String5,sizeof(String5)," %d",TicketsDeff);
			TextDrawShowForAll(TicketsDefenders);

			new String6[128];
			TextDrawHideForAll(TicketsAttackers);
	  	  TextDrawSetString(TicketsAttackers, String6);
      format(String6,sizeof(String6)," %d",TicketsAtt);
     	TextDrawShowForAll(TicketsAttackers);

  	}
	DisablePlayerCheckpoint(playerid);
  return 1;
}
Reply
#2

Thats not the code i posted, looks like you edited it and messed it all up. Heres what i posted this should work if you dont edit it.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  new String[128];
  SendDeathMessage(killerid, playerid, reason);
  SetPlayerColor(playerid,COLOR_GREY);
  if(playerid != INVALID_PLAYER_ID && killerid != INVALID_PLAYER_ID && gTeam[killerid] == gTeam[playerid])
  {
    format(String,sizeof(String),"[KICKED] Team Killer From Team %d",gTeam[killerid]);
    SendClientMessageToAll(red,String);
    return Kick(killerid);
  }
  if(killerid != INVALID_PLAYER_ID)
  {
     switch(gTeam[killerid])
     {
       case TEAM_HYDRA:{SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); TicketsDeff--;}
       case TEAM_HYDRA2:{SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); TicketsAtt--;}
     }
  }
  else if(killerid == INVALID_PLAYER_ID)
  {
     switch(gTeam[playerid])
     {
       case TEAM_HYDRA:TicketsAtt--;
       case TEAM_HYDRA2:TicketsDeff--;
     }
  }
  TextDrawHideForAll(TicketsDefenders);
  TextDrawHideForAll(TicketsAttackers);
  format(String,sizeof(String)," %d",TicketsDeff);
  TextDrawSetString(TicketsDefenders, String);
  format(String,sizeof(String)," %d",TicketsAtt);
  TextDrawSetString(TicketsAttackers, String);
  TextDrawShowForAll(TicketsDefenders);
  TextDrawShowForAll(TicketsAttackers);
  DisablePlayerCheckpoint(playerid);
  gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  return 1;
}
Reply
#3

Killa_ your code was not working and that's why i tried to edit it. The textdraws are not showing up at all (with or without editing)
That's why i tried to use Timer and the text showed up but didn't update.

Don't know what to do.
Reply
#4

Your textdraws might be messed up, your variables might be messed up... gimme ip i wana see this.
Reply
#5

--
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)