[REÅ ENO] DM

Započeo Plen Ki Mun, Jul 03, 2016, 19:16:49 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Moja
Detaljan opis problema: Kako da uradim kada je igrac unutar DM-a npr /cbdm i kada unutar dm-a opet upise /cbdm da izbaci da sam vec u dm i da prvo trebam izaci
Dio skripte:

[pawn]CMD:cbdm(playerid, params[])
{
                   #pragma unused params
                   if(cbug[playerid] == 0)
               {
                       
                  SetPlayerTeam(playerid, -1);
                      SetPlayerSkin(playerid, 26);
                      SetPlayerHealth(playerid, 100);
                      SetPlayerArmour(playerid, 100);
                      SetPlayerColor(playerid, 0x00C1F6AA);
                      SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);
                      SetPlayerInterior(playerid, 18);
                  GivePlayerWeapon(playerid, 24, 999999);
                  new name[MAX_PLAYER_NAME];
                  GetPlayerName(playerid, name, sizeof(name));
                  new string[128];
                  format(string, sizeof(string), "(CBUG ARENA)%s has joined cbug dm (/cbdm)!", name);
                   SendClientMessageToAll(0x80FF8096, string);
                   SendClientMessage(playerid,0x80FF8096 -1, "/qdm to leave CBug DeathMatch!");
               }
                

return 1;
}[/pawn]


Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Poslednja Izmena: Jul 04, 2016, 00:03:01 PRE PODNE od â–… â–† â–ˆ Rudimental â–ˆ â–† â–…

Dodaj proveru koliko vidim vec imas varijablu (predpostavljam da je ona sluzi za proveru ako je u cbdm)
[pawn]if(cbug[playerid] == 1) return SCM(playerid,-1,"Vec ste u DM zoni prvo izadji, /qdm.);[/pawn]

A ako ti ova varijabla ne sluzi za to
[pawn]new UsaoCBDM[MAX_PLAYERS];[/pawn]
Provera na pocetku komande
[pawn]if(UsaoCBDM[playerid] == 1) return SCM(playerid,-1,"Vec si u DM zoni prvo izadji, /qdm.");[/pawn]
Kada udje u zonu
[pawn]UsaoCBDM[playerid] = 1;[/pawn]
Kada izadje
[pawn]UsaoCBDM[playerid] = 0;[/pawn]
"... As bad as you may think i am,
as far as you think i am willing to go
to protect that which i hold most dear,
you can't possibly fathom how deep
that well of mine truly goes."

Citat: gruja.smoke poslato Jul 03, 2016, 19:44:28 POSLE PODNE
Dodaj proveru koliko vidim vec imas varijablu (predpostavljam da je ona sluzi za proveru ako je u cbdm)
[pawn]if(cbug[playerid] == 1) return SCM(playerid,-1,"Vec ste u DM zoni prvo izadji, /qdm.);[/pawn]

A ako ti ova varijabla ne sluzi za to
[pawn]new UsaoCBDM[MAX_PLAYERS];[/pawn]
Provera na pocetku komande
[pawn]if(UsaoCBDM[playerid] == 1) return SCM(playerid,-1,"Vec si u DM zoni prvo izadji, /qdm.");[/pawn]
Kada udje u zonu
[pawn]UsaoCBDM[playerid] = 1;[/pawn]
Kada izadje
[pawn]UsaoCBDM[playerid] = 0;[/pawn]


Imao sam definirano! ;) Tnx