toribio

toribio

Sep 9th, 2008
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. #include <a_samp>
  2. #include <dutils>
  3.  
  4. public OnFilterScriptInit()
  5. {
  6.     printf("Teste de soundIDs carregado!");
  7.     return 1;
  8. }
  9.  
  10. public OnPlayerCommandText(playerid, cmdtext[])
  11. {
  12.     new cmd[256];
  13.     new idx;
  14.     cmd = strtok(cmdtext, idx);
  15.     if(!strcmp(cmd, "/som", true))
  16.     {
  17.         new tmp[256];
  18.         tmp = strtok(cmdtext, idx);
  19.         if(!strlen(tmp))SendClientMessage(playerid, 0xFFFFFFAA, "  /som [soundid]");
  20.         if(strval(tmp) >= 1000 && strval(tmp) <= 1200)
  21.         {
  22.             new Float:x, Float:y, Float:z;
  23.             GetPlayerPos(playerid, x, y, z);
  24.             PlayerPlaySound(playerid, strval(tmp), x, y, z);
  25.         }
  26.         return 1;
  27.     }
  28.     if(!strcmp(cmdtext, "/parar", true))return PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment