Advertisement
Guest User

Mfg,m4a_X

a guest
Aug 11th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1.  
  2. #include <a_samp>
  3. #include <zcmd>
  4.  
  5.  
  6. new wait_timer[MAX_PLAYERS];
  7.  
  8.  
  9. public OnPlayerConnect(playerid)
  10. {
  11. wait_timer[playerid] = 0;
  12. return 1;
  13. }
  14.  
  15. public OnPlayerDisconnect(playerid, reason)
  16. {
  17. wait_timer[playerid] = 0;
  18. return 1;
  19. }
  20.  
  21.  
  22. COMMAND:ichbinneu(playerid,params[])
  23. {
  24. if(wait_timer[playerid] == 1)
  25. {
  26. new string[128];
  27. format(string,sizeof(string), "Hallo ich bin %s und bin neu auf diesem Server!", GetName(playerid));
  28. SendClientMessageToAll(0xFFFFFFFF,string);
  29. wait_timer[playerid] = 1;
  30. SetTimer("wait_timer", 30000, true);
  31. }
  32. else
  33. {
  34. SendClientMessage(playerid, 0xFFFFFFFF, "Du musst nach der eingabe 30 Sek. Warten!");
  35. }
  36. return 1;
  37. }
  38.  
  39. forward wait_timer(playerid);
  40. public wait_timer(playerid)
  41. {
  42. wait_timer[playerid] = 0;
  43. return 1;
  44. }
  45.  
  46. stock GetName(playerid)
  47. {
  48. new pName[MAX_PLAYER_NAME];
  49. GetPlayerName(playerid, pName, sizeof(pName));
  50. return pName;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement