27.11.2014, 08:14
(
Последний раз редактировалось Capua; 27.11.2014 в 08:54.
)
Hey. I'm trying to set a message to show up to all when a player starts capturing a zone. I'm having troubles displaying a string. I'll demonstrate:
The output will be for example: "Hospital is being captured by ". So the second string will be blank and that's what is my problem. It should display the team name that is capturing the zone.
Don't mind the dots I just skipped lines that aren't relevant with this case.
If you spot the issue and help me out, I'll be glad and give you rep!
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
for (new i=0;i<gCapZones;i++)
{
...
if(!gCapZone[i][czCapping])
{
...
gCapZone[i][czCappingTeam]=gPlayerInfo[playerid][pTeam];
new capstartstring[100];
format(capstartstring, sizeof(capstartstring), "%s is being captured by %s", gCapZone[i][czName], gCapZone[i][czCappingTeam]);
SendClientMessageToAll(-1, capstartstring);
}
return 1;
}
return 1;
}
Don't mind the dots I just skipped lines that aren't relevant with this case.
If you spot the issue and help me out, I'll be glad and give you rep!