21.11.2010, 11:35
I got this strok splitstring:
And this is my realchat
Now I'm asking you guys.. How do I put those 2 together?
Код:
stock SplitStringI(CharPerLine, playerid, StringToSplit[]) { new Lines = floatround(strval(StringToSplit) / CharPerLine, floatround_ceil); new Tempstr[256]; for(new x = 1; x<Lines; x++) { strmid(Tempstr, StringToSplit, x*150 - 150, x*150); ProxDetector(30.0, playerid, Tempstr, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } return 1; }
Код:
if (realchat) { if(gPlayerLogged[playerid] == 0) { return 0; } GetPlayerName(playerid, sendername, sizeof(sendername)); if(!IsPlayerInAnyVehicle(playerid)) { if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), "Stranger Says: %s", text); ProxDetector(5.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { if(PlayerInfo[playerid][pAccent] == 0) format(string, sizeof(string), "%s Says: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 1) format(string, sizeof(string), "%s Says [British Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 2) format(string, sizeof(string), "%s Says [Japanese Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 3) format(string, sizeof(string), "%s Says [Chinese Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 4) format(string, sizeof(string), "%s Says [Korean Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 5) format(string, sizeof(string), "%s Says [Scottish Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 6) format(string, sizeof(string), "%s Says [Irish Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 7) format(string, sizeof(string), "%s Says [Russian Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 8) format(string, sizeof(string), "%s Says [American Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 9) format(string, sizeof(string), "%s Says [Mexican Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 10) format(string, sizeof(string), "%s Says [Texan Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 11) format(string, sizeof(string), "%s Says [Cuban Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 12) format(string, sizeof(string), "%s Says [Italian Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 13) format(string, sizeof(string), "%s Says [Gangsta Accent]: %s", RemoveUnderScore(playerid), text); else if(PlayerInfo[playerid][pAccent] == 14) format(string, sizeof(string), "%s Says [Australian Accent]: %s", RemoveUnderScore(playerid), text); else format(string, sizeof(string), "%s Says: %s", RemoveUnderScore(playerid), text); ProxDetector(5.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } }