Advertisement
Parix

Luca chat

Nov 7th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. stock PrendiNome(Player)
  2. {
  3. new Nome[24];
  4. GetPlayerName(Player, Nome, sizeof(Nome));
  5. strreplace(Nome, '_', ' ');
  6. return Nome;
  7. }
  8.  
  9. stock PrendiNome(playerid)
  10. {
  11. new Nome[24];
  12. GetPlayerName(playerid, Nome, sizeof(Nome));
  13. strreplace(Nome, '_', ' ');
  14. return Nome;
  15. }
  16.  
  17. stock strreplace(string[], find, replace)
  18. {
  19. for(new i=0; string[i]; i++)
  20. {
  21. if(string[i] == find)
  22. {
  23. string[i] = replace;
  24. }
  25. }
  26. }
  27.  
  28. stock ClearChat(playerid, times) //Pulisce la chat al giocatore
  29. {
  30. for(new j=0; j<times; j++)
  31. {
  32. SendClientMessage(playerid, -1, "");
  33. }
  34. return 1;
  35. }
  36.  
  37.  
  38. public OnPlayerText(playerid, text[])
  39. {
  40. new messaggio[128];
  41. format(messaggio, sizeof(messaggio), "[IC]%s dice: %s", PrendiNome(playerid), text);
  42. ProxDetector(30.0, playerid, messaggio, -1);
  43. return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement