Jump to content
  • 0

Problema /dm Rspawn


SkyLeAs

Question

Problemă întâlnită (descriere):

Pai daca eu fac mor/ma omorat unu nu ma respawneaza in dm si in al loc de spawn dar nu in dm 
Ero(area / rile) / warning-(ul / urile):~~~
Liniile de cod / sursa / script-ul:

Pai am facut asa

new Float:DMSpawns[][5] = {

    {-1657.0603,964.9716,49.3438,305.8671},
    {-1650.4016,1000.9796,49.3438,202.7794},
    {-1621.0332,1003.1749,49.3438,122.8786},
    {-1614.8210,973.2370,49.3438,49.5579}
};
CMD:dm1(playerid, params[])
{
     SetPlayerInterior(playerid, 0);
     SetPlayerVirtualWorld(playerid, 10);
     new rand = random(sizeof(DMSpawns)); 
     SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);
     SetPlayerFacingAngle(playerid, DMSpawns[rand][4]);
     GivePlayerWeapon(playerid, 24, 1500); // Desert Eagle
     GivePlayerWeapon(playerid, 26, 1500); // Sawnoff Shutgun
     return 1;
}

Imagini / Video (optional):!!!
Aţi încercat să rezolvaţi singur?: Nu ca nu stiu cum :) adica cum e cu respawn

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

Creezi o noua variabila care va stoca daca jucatorul este in DM. (new InDM[MAX_PLAYERS];)

 

Te duci la OnPlayerConnect si pui InDM[playerid] = 0;

 

La comanda adaugi InDm[playerid] = 1;

 

Iar la OnPlayerSpawn pui

 

if(InDm[playerid] == 1)

{

     new rand = random(sizeof(DMSpawns));

     SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);
     SetPlayerFacingAngle(playerid, DMSpawns[rand][4]);
     GivePlayerWeapon(playerid, 24, 1500); // Desert Eagle
     GivePlayerWeapon(playerid, 26, 1500); // Sawnoff Shutgun

}

  • Upvote 1

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

Creezi o noua variabila care va stoca daca jucatorul este in DM. (new InDM[MAX_PLAYERS];)

 

Te duci la OnPlayerConnect si pui InDM[playerid] = 0;

 

La comanda adaugi InDm[playerid] = 1;

 

Iar la OnPlayerSpawn pui

 

if(InDm[playerid] == 1)

{

     new rand = random(sizeof(DMSpawns));

     SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);

     SetPlayerFacingAngle(playerid, DMSpawns[rand][4]);

     GivePlayerWeapon(playerid, 24, 1500); // Desert Eagle

     GivePlayerWeapon(playerid, 26, 1500); // Sawnoff Shutgun

}

Bun merge dar comanda sa dau /exit ? :)) nu mi-ai dat

Si sa imi arate un text cas in dm si sa dau /leave daca vreau sa folo alta comanda..

Edited by Gotze
Link to comment
Share on other sites

Pai faci comanda /exitdm exemplu:

if(strcmp(cmd, "/exitdm", true) == 0)
{
if( InDM[playerid] == 0; ) return SendClientMessage( playerid, -1, "Nu ai intrat in zona DM.Scrie /dm pentru a intra in zona de DM." );
SendClientMessage(playerid, -1, "» {FFFFFF}Ai iesit din zona de DM.");
SetPlayerPos(playerid,x,y,z);// pui coordonatele X Y Z.
InDM[playerid] = 0;
return 1;
}

 

 

Link to comment
Share on other sites

Am pus cum mi-a dat gireada... dar imi da

D:Server DeathMatch Streetgamemodesbare.pwn(168) : error 017: undefined symbol "InDm"
D:Server DeathMatch Streetgamemodesbare.pwn(168) : warning 215: expression has no effect
D:Server DeathMatch Streetgamemodesbare.pwn(168) : error 001: expected token: ";", but found "]"
D:Server DeathMatch Streetgamemodesbare.pwn(168) : error 029: invalid expression, assumed zero
D:Server DeathMatch Streetgamemodesbare.pwn(168) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Linia

if(InDm[playerid] == 1)
Link to comment
Share on other sites

if(strcmp(cmd, "/exitdm", true) == 0)
{
    if( InDM[playerid] == 0 ) return SendClientMessage( playerid, -1, "Nu ai intrat in zona DM.Scrie /dm pentru a intra in zona de DM." );
    SendClientMessage(playerid, -1, "» {FFFFFF}Ai iesit din zona de DM.");
    SetPlayerPos(playerid,x,y,z);// pui coordonatele X Y Z.
    InDM[playerid] = 0;
    return 1;
}

Edited by Gireada

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

if(strcmp(cmd, "/exitdm", true) == 0)

{

    if( InDM[playerid] == 0 ) return SendClientMessage( playerid, -1, "Nu ai intrat in zona DM.Scrie /dm pentru a intra in zona de DM." );

    SendClientMessage(playerid, -1, "» {FFFFFF}Ai iesit din zona de DM.");

    SetPlayerPos(playerid,x,y,z);// pui coordonatele X Y Z.

    InDM[playerid] = 0;

    return 1;

}

La fel...

D:Server DeathMatch Streetgamemodesbare.pwn(168) : error 017: undefined symbol "InDm"
D:Server DeathMatch Streetgamemodesbare.pwn(168) : warning 215: expression has no effect
D:Server DeathMatch Streetgamemodesbare.pwn(168) : error 001: expected token: ";", but found "]"
D:Server DeathMatch Streetgamemodesbare.pwn(168) : error 029: invalid expression, assumed zero
D:Server DeathMatch Streetgamemodesbare.pwn(168) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.