01.07.2014, 09:55
Quote:
look, what i want
i just want that if a recieve my birthday in server then server should send me message its ur birthday and to others its X_MAN's or anyname birthday! when i use ur code it keep spam! |
Код:
new szString[22+MAX_PLAYER_NAME], szPlayername[MAX_PLAYER_NAME+1]; //creates 2 new strings, one for the text and one for the name GetPlayerName(playerid, szPlayername, sizeof(szPlayername)); //gets the players name format(szString, sizeof(szString), "* It is %s's birthday!", szPlayername); //formats the text that everyone else will see for(new i =0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) //checks that the player is connected { if(playerid == i) //if the player specified is you, send you a unique message SendClientMessage(i, -1, "It is your birthday today!"); else //if it is any other player, send them the message formatted earlier SendClientMessage(i, -1, szString); } }