twitchplays

Untitled

Aug 14th, 2014
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public OnPlayerConnect(playerid)
  2. {
  3. new pName[24];
  4. new str[128];
  5. GetPlayerName(playerid, pName, 24);
  6. format(str, 128, "%s has joined the server", pName);
  7. SendClientMessageToAll(0xAFAFAFAA, str);
  8. return 1;
  9. }
  10.  
  11. public OnPlayerDisconnect(playerid, reason)
  12. {
  13. new pName[24];
  14. new str[128];
  15. GetPlayerName(playerid, pName, 24);
  16.  
  17. switch(reason)
  18. {
  19. case 0: format(str, 128, "%s has left. (Timeout)", pName);
  20. case 1: format(str, 128, "%s has left. (Leaving)", pName);
  21. case 2: format(str, 128, "%s has left. (Kicked)", pName);
  22. }
  23. SendClientMessageToAll(0xAFAFAFAA, str);
  24. return 1;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment