xqz

xqz

xqz
Dec 19th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.17 KB | None | 0 0
  1. CMD:zspeed(playerid,params[])
  2. {
  3. new Float:tmp;
  4. if(sscanf(params,"f",tmp)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /zspeed [speed]");
  5. Zspeed=tmp;
  6. return 1;
  7. }
  8. CMD:ztimerspeed(playerid,params[])
  9. {
  10. new Float:tmp;
  11. if(sscanf(params,"f",tmp)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /ZTimerSpeed [timer speed]");
  12. ZTimerSpeed=tmp;
  13. cmd_zstop(playerid,params);
  14. cmd_zstart(playerid,params);
  15. return 1;
  16. }
  17. CMD:zo(playerid,params[])
  18. {
  19. new Float:pX,Float:pY,Float:pZ,Float:Ang;
  20. GetPlayerPos(playerid,pX,pY,pZ);
  21. GetPlayerFacingAngle(playerid,Ang);
  22. pX=pX+3.0*floatsin(-Ang,degrees);
  23. pY=pY+3.0*floatcos(-Ang,degrees);
  24. pZ=pZ+0.7;
  25. CrearZombie(pX,pY,pZ,Ang+180.0);
  26. return 1;
  27. }
  28. CMD:zstart(playerid,params[])
  29. {
  30. if (NOFZombies>0)
  31. {
  32. new id;
  33. if(sscanf(params,"d",id)) return SendClientMessage(playerid, 0xFFFFFFAA, "Uzyj/ cos [playerid]");
  34. if (!IsPlayerConnected(id))
  35. {
  36. SendClientMessage(playerid, 0xFFFFFFAA, "That player is not conected!");
  37. return 1;
  38. }
  39. if (TimerAtaca!=-1){KillTimer(TimerAtaca);}
  40. for (new j=0;j<TOTALZombies;j++){zombie[j][target]=id;}
  41. TimerAtaca=SetTimer("zombieAtaca",ZTimerSpeed,1);
  42. return 1;
  43. }
  44. return 1;
  45. }
  46. CMD:zstop(playerid, params[])
  47. {
  48. if (NOFZombies>0)
  49. {
  50. if (TimerAtaca!=-1)
  51. {
  52. KillTimer(TimerAtaca);
  53. }
  54. for (new j=0;j<TOTALZombies;j++)
  55. {
  56. if (zombie[j][undead])
  57. {
  58. StopObject(zombie[j][head]);
  59. StopObject(zombie[j][torso]);
  60. StopObject(zombie[j][rArm]);
  61. StopObject(zombie[j][lArm]);
  62. StopObject(zombie[j][rLeg]);
  63. StopObject(zombie[j][lLeg]);
  64. }
  65. }
  66. return 1;
  67. }
  68. SendClientMessage(playerid, 0xFFFFFFAA, "There are no zombies");
  69. return 1;
  70. }
  71. CMD:zclean(playerid, params[])
  72. {
  73. cleanZombies();
  74. SendClientMessage(playerid, 0xFFFFFFAA, "There are no zombies anymore!");
  75. return 1;
  76. }
  77. CMD:ttt(playerid, params[])
  78. {
  79. new tmp[30], hora; // to musi byc tablica skoro pozniej z tego tekst wysylasz (nie float)
  80. if(sscanf(params,"d",hora)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /ttt ");
  81. SetWorldTime(hora);
  82. format(tmp, sizeof(tmp), "Ahora la hora es: %d", hora);
  83. SendClientMessage(playerid, 0xFFFFFFAA, tmp);
  84. return 1;
  85. }
  86. CMD:zcantzombies(playerid, params[])
  87. {
  88. new tmp;
  89. if(sscanf(params,"d",tmp)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /zcantzombies [ilosc]");
  90. cleanZombies();
  91. TOTALZombies = tmp;
  92. return 1;
  93. }
  94. CMD:ambient(playerid, params[])
  95. {
  96. SetWorldTime(0);
  97. SetWeather(8);
  98. return 1;
  99. }
  100. CMD:apocalipsion(playerid, params[])
  101. {
  102. apocalipsis = true;
  103. for (new i=0;i<MAX_PLAYERS;i++)
  104. {
  105. if(IsPlayerConnected(i))
  106. {
  107. QuitarArmasZombie(i);
  108. money[playerid]=GetPlayerMoney(playerid);
  109. ResetPlayerMoney(playerid);
  110. }
  111. }
  112. scorez=0;
  113. scorep=0;
  114. SetWorldTime(0);
  115. SetWeather(8);
  116. GameTextForAll("~r~apocalipsis ~w~mode:~b~on~w~! ~n~~n~~n~~g~ZOMBIES~w~!!!",5000,5);
  117. if (TimerAPO!=-1){KillTimer(TimerAPO);}
  118. TimerAPO = SetTimer("attacknearest",10000,1);
  119. if (TimerAtaca!=-1){KillTimer(TimerAtaca);}
  120. TimerAtaca=SetTimer("zombieAtaca",ZTimerSpeed,1);
  121. while (NOFZombies<TOTALZombies)CreateRandomZombie();
  122. attacknearest();
  123. return 1;
  124. }
  125. CMD:apocalipsioff(playerid, params[])
  126. {
  127. if (apocalipsis)
  128. {
  129. new tmp[255];
  130. for (new i=0;i<MAX_PLAYERS;i++)if(IsPlayerConnected(i)){DevolverArmasZombie(i);GivePlayerMoney(i,money[i]);}
  131. format(tmp,255,"~w~SCORE ~r~Zombies~w~: %d ~b~Humans~w~: %d~n~~n~~r~apocalipsis ~w~mode:~b~off~w~",scorez,scorep);
  132. GameTextForAll(tmp,6000,4);
  133. apocalipsis = false;
  134. SetWorldTime(12);
  135. SetWeather(7);
  136. cleanZombies();
  137. }
  138. if (TimerAPO!=-1){KillTimer(TimerAPO);}
  139. if (TimerAtaca!=-1){KillTimer(TimerAtaca);}
  140. return 1;
  141. }
  142. CMD:vaiven(playerid, params[])
  143. {
  144. new Float:tmp;
  145. if(sscanf(params,"f",tmp)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /vaiven [angulo]");
  146. vaiven=tmp;
  147. return 1;
  148. }
  149. CMD:zSetWeaponSet(playerid, params[])
  150. {
  151. new tmp[50],idgun;
  152. if(sscanf(params,"d",idgun)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /zsetweaponset [gun]");
  153. if (idgun<sizeof(set))
  154. {
  155. format(tmp,sizeof(tmp),"Please pick a number beetwen 0-%d",sizeof(set));
  156. SendClientMessage(playerid, 0xFFFFFFAA, tmp);
  157. return 1;
  158. }
  159. setNumber=idgun;
  160. return 1;
  161. }
  162. CMD:zGetWeapon(playerid, params[])
  163. {
  164. new tmp;
  165. if(sscanf(params,"d",tmp)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /zgetweapon [weap]");
  166. GivePlayerWeapon(playerid,tmp, 10000);
  167. return 1;
  168. }
  169. CMD:zGiveWeaponforall(playerid, params[])
  170. {
  171. new tmp;
  172. if(sscanf(params,"d",tmp)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /zgiveweaponforall ");
  173. for (new i=0;i<MAX_PLAYERS;i++){if(IsPlayerConnected(i))
  174. GivePlayerWeapon(i,tmp,10000);}
  175. return 1;
  176. }
Advertisement
Add Comment
Please, Sign In to add comment