Spawn message
#1

Can someone tell me why this message doesn't work when on player spawn?

pawn Код:
new buf[250];
    format(buf, sizeof(buf), "* Current rank: "SAMP_BLUE"%s (%i) "WHITE"| "SAMP_BLUE"Rank score: %i "WHITE"| "SAMP_BLUE"Rank health %f "WHITE"| "SAMP_BLUE"Rank armour: %f.", gRank[Player[playerid][Rank]][rankName], Player[playerid][Rank], gRank[Player[playerid][Rank]][rankScore], gRank[Player[playerid][Rank]][rankHealth], gRank[Player[playerid][Rank]][rankArmour]);
    SendClientMessage(playerid, -1, buf);
I don't even get this message on spawn.
Reply
#2

I've had a problem with messages not being sent due to too many colors.

Might be it. You got 7.
Reply
#3

Make Sure you are adding the message at proper place.
Reply
#4

Try:
Код:
public OnPlayerSpawn(playerid)
{
    new buf[250];
    format(buf, sizeof(buf), "* Current rank: "SAMP_BLUE"%s (%i) "WHITE"| "SAMP_BLUE"Rank score: %i "WHITE"| "SAMP_BLUE"Rank health %f "WHITE"| "SAMP_BLUE"Rank armour: %f.", gRank[Player[playerid][Rank]][rankName], Player[playerid][Rank], gRank[Player[playerid][Rank]][rankScore], gRank[Player[playerid][Rank]][rankHealth], gRank[Player[playerid][Rank]][rankArmour]);
    SendClientMessage(playerid, -1, buf);
}
Reply
#5

You can lower the string size to 128, that's the max length of a client message (the rest is just wasted).

I'm pretty sure your string will be longer, so you might want to split it into two messages.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)