Jump to content
  • 0

pomoc Zvuk při otevření brány (PROBLEM S NIM MAM HO TMA DANY)


Guest Gormy

Dotaz

[list=]Vim že sem píšu dsot často ale sem v pawnu trochu lamka a mam udelanou takovou vec mam udelanou branu otevreni zavreni a ted sem si do toho pridelal ze hraje zvuk jako kdyz ste u brany ktera uz je u cj domu tak ten zvuk a dal sem dva ze Open gate start a stop hned pod to ale ono to hraje vterinu a vypne se to jak mam udelat aby ten druhy zvuk to vypnul az po 4 sekundach ?? dekuji predem poslu vam jak to amm udelane...

 

//prikaz pro otevreni
if(strcmp(cmdtext, "/otevrit4", true) == 0) {
MoveObject(brana4, -2052.803,-2400.832,26.233, 5);// kam se ma brana pohnout po prikazu otevrit pokud kces otevrit 2 naraz bude to takto:
SendClientMessage(playerid, COLOR_GREEN,"Brana je otevrena.");
PlayerPlaySound(playerid,1153,-2052.803,-2400.832,26.233);//tady je hudba id je 1178
PlayerPlaySound(playerid,1154,-2052.803,-2400.832,26.233);//tady je hudba id je 1178
return 1;
}
//zavrit
if(strcmp(cmdtext, "/zavrit4", true) == 0) {
MoveObject(brana4, -2052.807,-2400.828,32.452, 5);// kam se ma brana pohnout po prikazu otevrit pokud kces otevrit 2 naraz bude to takto:
SendClientMessage(playerid, COLOR_GREEN,"Brana je zavrena.");
PlayerPlaySound(playerid,1153,-2052.803,-2400.832,26.233);//tady je hudba id je 1178
PlayerPlaySound(playerid,1154,-2052.803,-2400.832,26.233);//tady je hudba id je 1178
return 1;
}

Link to comment
Share on other sites

9 odpovědí na tuto otázku

Recommended Posts

  • 0

příkaz :

 

if(strcmp(cmdtext, "/zapni", true) == 0) {
for(new i=0;iPlayerPlaySound(i,1153,-2052.803,-2400.832,26.233);
}
return 1;
}

 

if(strcmp(cmdtext, "/vypni", true) == 0) {
for(new i=0;iPlayerPlaySound(i,1154,-2052.803,-2400.832,26.233);
}
return 1;
}

Link to comment
Share on other sites

  • 0

OK v poho zkusim

 

//EDIT: Tak jsem to zkusil a pane jo 6 eroru

 

C:\DOCUME~1\Stepan\Plocha\ap.pwn(940) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(941) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(944) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(947) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(948) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(951) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.

if(strcmp(cmdtext, "/alarm-on", true) == 0) {
for(new i=0;iPlayerPlaySound(i, 1091,-2052.803,-2400.832,26.233);
}
return 1;
}

if(strcmp(cmdtext, "/alarm-off", true) == 0) {
for(new i=0;iPlayerPlaySound(i, 1092,-2052.803,-2400.832,26.233);
}
return 1;
}

 

Nepotrebuje to nake definice bo tak ?

Link to comment
Share on other sites

  • 0

if(strcmp(cmdtext, "/alarm-on", true) == 0) {
PlaySoundForAll(1091,-2052.803,-2400.832,26.233);
return 1;
}

if(strcmp(cmdtext, "/alarm-off", true) == 0) {
PlaySoundForAll(1092,-2052.803,-2400.832,26.233);
return 1;
}

 

toto si hod nekam do modu

 

PlaySoundForAll(soundid, Float:x = 0.0, Float:y = 0.0, Float:z = 0.0)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayerPlaySound(i, soundid, x, y, z);
}}}

Link to comment
Share on other sites

  • 0

Chytraku 9 eroru

C:\DOCUME~1\Stepan\Plocha\ap.pwn(946) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(947) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(948) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(951) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(952) : error 021: symbol already defined: "PlaySoundForAll"
C:\DOCUME~1\Stepan\Plocha\ap.pwn(952) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(953) : error 010: invalid function or declaration
C:\DOCUME~1\Stepan\Plocha\ap.pwn(1512) : error 025: function heading differs from prototype
C:\DOCUME~1\Stepan\Plocha\ap.pwn(1513) : error 021: symbol already defined: "PlaySoundForAll"
C:\DOCUME~1\Stepan\Plocha\ap.pwn(1520) : warning 203: symbol is never used: "PlaySoundForAll"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


9 Errors.

 

946-953

if(strcmp(cmdtext, "/alarm-on", true) == 0) {
PlaySoundForAll(1091,-2052.803,-2400.832,26.233);
return 1;
}

if(strcmp(cmdtext, "/alarm-off", true) == 0) {
PlaySoundForAll(1092,-2052.803,-2400.832,26.233);
return 1;
}

 

1512-1520

 

PlaySoundForAll(soundid, Float:x = 0.0, Float:y = 0.0, Float:z = 0.0)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayerPlaySound(i, soundid, x, y, z);
}}}

 

na 1520 ni nemam

 

 

podle toho co sem vycetl tak chybi definice tky ne? kdyz sem dal nahoru

new PlaySoundForAll tak to jeden eror vyresilo

Link to comment
Share on other sites

  • 0

Ja nemuzu za to , ze neumis ani vlozit kod do sveho pawna, skousel sem to u sebe i v novem pawne, bez problemu pane boze dnes neumi lidi ani kopirovat kody z for..

 

EDIT: opravil jsem na icq stacilo totiz dat jen prikazy do commandtextu a ne mezi dcmd ze ano gormy :cry:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...