Advertisement
Guest User

OnPlayerConnect

a guest
Sep 18th, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. // ONPLAYERCONNECT
  2. public OnPlayerConnect(playerid)
  3. {
  4. AntiFlood_InitPlayer( playerid );
  5. Avertizari[playerid] = 0;
  6. ZcmdSpam[playerid] = 0;
  7. destroyer[playerid] = 0;
  8. pnsmoney[playerid] = 0;
  9. FPSOn[playerid] = 0;
  10. HealthOn[playerid] = 0;
  11. OnDutymedic[playerid] = 0;
  12. cased[playerid] = 0;
  13. caser[playerid] = 1001;
  14. RepairTime[playerid] = 0;
  15. Tigaanel[playerid] = 0;
  16. LastPlayer[playerid] = -1;
  17. PlayerInfo[playerid][pNRE] = -1;
  18. LoadTextdraws(playerid);
  19. KillTimer(login[playerid]);
  20.  
  21. // TEXTDRAW
  22. PlayerTextDrawShow(playerid, logo[playerid]);
  23. PlayerTextDrawShow(playerid, Time);
  24. PlayerTextDrawShow(playerid, Date);
  25. GameTextForPlayer(playerid, "~w~LOADING...~n~~y~CHECKING BAN STATUS~n~", 3500, 3);
  26. new tiganel[200],
  27. str1[128];
  28. GetPlayerName(playerid, tiganel, sizeof(tiganel));
  29. if(strlen(tiganel) < 4)
  30. {
  31. PlayerTextDrawShow(playerid, namelogo1[playerid]);
  32. format(str1,sizeof(str1),"%s",tiganel);
  33. PlayerTextDrawSetString(playerid, namelogo1[playerid], str1);
  34. }
  35. else if(strlen(tiganel) < 7 && strlen(tiganel) > 3)
  36. {
  37. PlayerTextDrawShow(playerid, namelogo2[playerid]);
  38. format(str1,sizeof(str1),"%s",tiganel);
  39. PlayerTextDrawSetString(playerid, namelogo2[playerid], str1);
  40. }
  41. else if(strlen(tiganel) < 10 && strlen(tiganel) > 6)
  42. {
  43. PlayerTextDrawShow(playerid, namelogo3[playerid]);
  44. format(str1,sizeof(str1),"%s",tiganel);
  45. PlayerTextDrawSetString(playerid, namelogo3[playerid], str1);
  46. }
  47. else if(strlen(tiganel) < 13 && strlen(tiganel) > 9)
  48. {
  49. PlayerTextDrawShow(playerid, namelogo4[playerid]);
  50. format(str1,sizeof(str1),"%s",tiganel);
  51. PlayerTextDrawSetString(playerid, namelogo4[playerid], str1);
  52. }
  53. else if(strlen(tiganel) < 16 && strlen(tiganel) > 12)
  54. {
  55. PlayerTextDrawShow(playerid, namelogo5[playerid]);
  56. format(str1,sizeof(str1),"%s",tiganel);
  57. PlayerTextDrawSetString(playerid, namelogo5[playerid], str1);
  58. }
  59. else if(strlen(tiganel) < 19 && strlen(tiganel) > 15)
  60. {
  61. PlayerTextDrawShow(playerid, namelogo6[playerid]);
  62. format(str1,sizeof(str1),"%s",tiganel);
  63. PlayerTextDrawSetString(playerid, namelogo6[playerid], str1);
  64. }
  65. else if(strlen(tiganel) < 22 && strlen(tiganel) > 18)
  66. {
  67. PlayerTextDrawShow(playerid, namelogo7[playerid]);
  68. format(str1,sizeof(str1),"%s",tiganel);
  69. PlayerTextDrawSetString(playerid, namelogo7[playerid], str1);
  70. }
  71. else if(strlen(tiganel) < 25 && strlen(tiganel) > 21)
  72. {
  73. PlayerTextDrawShow(playerid, namelogo8[playerid]);
  74. format(str1,sizeof(str1),"%s",tiganel);
  75. PlayerTextDrawSetString(playerid, namelogo8[playerid], str1);
  76. }
  77. else if(strlen(tiganel) < 28 && strlen(tiganel) > 24)
  78. {
  79. PlayerTextDrawShow(playerid, namelogo9[playerid]);
  80. format(str1,sizeof(str1),"%s",tiganel);
  81. PlayerTextDrawSetString(playerid, namelogo9[playerid], str1);
  82. }
  83. else if(strlen(tiganel) < 31 && strlen(tiganel) > 27)
  84. {
  85. PlayerTextDrawShow(playerid, namelogo10[playerid]);
  86. format(str1,sizeof(str1),"%s",tiganel);
  87. PlayerTextDrawSetString(playerid, namelogo10[playerid], str1);
  88. }
  89. if(IsPlayerConnected(playerid))
  90. {
  91. PlayerTextDrawShow(playerid, healthu[playerid]);
  92. }
  93. if(antirem[playerid] == 0)
  94. {
  95. antirem[playerid] = 1;
  96. }
  97. if(CountIP(GetIP(playerid)) > 2 && !IsPlayerNPC(playerid))
  98. {
  99. Kick(playerid);
  100. return 1;
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement