Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #include "Functions.h"
  2. #include "Define.h"
  3. void Command(int clientid, int cmd_addr)
  4. {
  5. char comando[100];
  6. sprintf(comando, "%s %s", cmd_addr+0x0C, cmd_addr+0x1C);
  7. int addr_bclient = clientid * 0x0410;
  8. int cLevel = PInt(addr_bclient + LEVEL_ADDR);
  9.  
  10. if((strncmp(comando, "on", 2) == 0) && (cLevel >= 0))
  11. {
  12. int n_p,i,cName;
  13. char Message[100];
  14. n_p = 0;
  15.  
  16. for(i=0;i<=100;i++)
  17. {
  18. cName =PByte( Name_addr + ( i * 0x410));
  19. if (cName != 0)
  20. {
  21. n_p ++;
  22. }
  23.  
  24. }
  25.  
  26. sprintf(Message,"Estão conectados %d player(s)",n_p);
  27. SendClientMessage(clientid,Message);
  28. asm(".intel_syntax noprefix\n");
  29. asm("mov eax, 1\n");
  30. return;
  31. }
  32.  
  33. asm(".intel_syntax noprefix\n");
  34. asm("mov eax, 0\n");
  35. return;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement