Oko voice chata

Započeo Martyn, Maj 11, 2020, 00:48:02 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Gde da ubacim ovu liniju za prolazenje zvukova sv_stream_player_attach(stream, playerid); , dole imate moju skriptu za voice chat
Dio skripte: [pawn]#include <a_samp>
#include <core>
#include <float>
#include <sampvoice>

#define sv_stream_player_attach
#define stream
#define sv_send_packet
#define player_stream

#pragma tabsize 0

main() {}

new SV_GSTREAM:gstream;
new SV_LSTREAM:lstream[MAX_PLAYERS] = { SV_NULL, ... };

public SV_VOID:OnPlayerActivationKeyPress(
   SV_UINT:playerid,
   SV_UINT:keyid
) {
   if (keyid == 0x42 && lstream[playerid]) SvAttachSpeakerToStream(lstream[playerid], playerid);
   if (keyid == 0x5A && gstream) SvAttachSpeakerToStream(gstream, playerid);
}

public SV_VOID:OnPlayerActivationKeyRelease(
   SV_UINT:playerid,
   SV_UINT:keyid
) {
   if (keyid == 0x42 && lstream[playerid]) SvDetachSpeakerFromStream(lstream[playerid], playerid);
   if (keyid == 0x5A && gstream) SvDetachSpeakerFromStream(gstream, playerid);
}

public OnPlayerConnect(playerid) {

   if (!SvGetVersion(playerid)) SendClientMessage(playerid, -1, "{FF0000}VOICE: {FFFFFF}Imate stariju verziju dodatka, mozda nekompatibilnu, updateaj te je !");
   else if (!SvHasMicro(playerid)) SendClientMessage(playerid, -1, "{FF0000}VOICE: {FFFFFF}Nemate instaliran SAMP-VOICE !");
   else if (lstream[playerid] = SvCreateDLStreamAtPlayer(40.0, SV_INFINITY, playerid, 0xff0000ff, "L")) { // red color
      SendClientMessage(playerid, -1, "{FF0000}VOICE: {FFFFFF}VOICE PLUGIN USPESNO UCITAN !");
      if (gstream) SvAttachListenerToStream(gstream, playerid);
      SvAddKey(playerid, 0x42);
      SvAddKey(playerid, 0x5A);
   }

   return 1;

}

public OnPlayerDisconnect(playerid, reason) {

   if (lstream[playerid]) {
      SvDeleteStream(lstream[playerid]);
      lstream[playerid] = SV_NULL;
   }

   return 1;

}

public OnPlayerSpawn(playerid) {

   SetPlayerInterior(playerid,0);
   TogglePlayerClock(playerid,0);

   return 1;

}

public OnPlayerDeath(playerid, killerid, reason) {

      return 1;

}

SetupPlayerForClassSelection(playerid) {
   SetPlayerInterior(playerid,14);
   SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
   SetPlayerFacingAngle(playerid, 270.0);
   SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
   SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}

public OnPlayerRequestClass(playerid, classid) {
   SetupPlayerForClassSelection(playerid);
   return 1;
}

public OnGameModeInit() {

   //SvDebug(SV_TRUE);

   gstream = SvCreateGStream(0xffff0000, "G"); // blue color
}[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //

druze mozes da mi pomognes, ja sam ubacio include <sampvoice> i ovo mi ispadne


C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(11) : warning 213: tag mismatch
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(13) : warning 235: public function lacks forward declaration (symbol "OnPlayerActivationKeyPress")
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(17) : error 017: undefined symbol "SvAttachSpeakerToStream"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(18) : error 017: undefined symbol "SvAttachSpeakerToStream"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(21) : warning 235: public function lacks forward declaration (symbol "OnPlayerActivationKeyRelease")
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(25) : error 017: undefined symbol "SvDetachSpeakerFromStream"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(26) : error 017: undefined symbol "SvDetachSpeakerFromStream"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(31) : error 017: undefined symbol "SvGetVersion"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(32) : error 017: undefined symbol "SvHasMicro"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(33) : warning 211: possibly unintended assignment
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(33) : error 017: undefined symbol "SvCreateDLStreamAtPlayer"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(35) : error 017: undefined symbol "SvAttachListenerToStream"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(36) : error 017: undefined symbol "SvAddKey"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(37) : error 017: undefined symbol "SvAddKey"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(47) : error 017: undefined symbol "SvDeleteStream"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(48) : warning 213: tag mismatch
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(87) : error 017: undefined symbol "SvCreateGStream"
C:\Users\Alan\Desktop\Serveri\SAMP server\gamemodes\bare.pwn(87) : warning 213: tag mismatch
Pawn compiler 3.10.4 Copyright (c) 1997-2006, ITB CompuPhase


12 Errors.
[code]


Citat: Miki11 poslato Maj 11, 2020, 17:27:58 POSLE PODNE
Pod OnPlayerConnect

sve imas ovdje samo treba pronac https://github.com/CyberMor/sampvoice
Ovo mi izbaci D:\Ideal Gaming\Ideal Gaming\filterscripts\voicec.pwn(19) : warning 235: public function lacks forward declaration (symbol "OnPlayerVoice")
D:\Ideal Gaming\Ideal Gaming\filterscripts\voicec.pwn(25) : warning 215: expression has no effect
D:\Ideal Gaming\Ideal Gaming\filterscripts\voicec.pwn(59) : warning 211: possibly unintended assignment
D:\Ideal Gaming\Ideal Gaming\filterscripts\voicec.pwn(62) : error 029: invalid expression, assumed zero
D:\Ideal Gaming\Ideal Gaming\filterscripts\voicec.pwn(62) : error 029: invalid expression, assumed zero
D:\Ideal Gaming\Ideal Gaming\filterscripts\voicec.pwn(62) : warning 215: expression has no effect