29.05.2016, 17:20
when i tape /breach it is doing the command normally but when i do /stopbreach it's crashing my server there is the code
and that it's the same :
+rep if you see the what does it crash
edit : oh i have forget that :
PHP код:
CMD:breach(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
if (GetPVarInt(playerid, "BREACH") == 1) return SendClientMessage(playerid, 0xAA3333AA, "[ERREUR]Il y a dйjа une brиche en cours!");
SendClientMessage(playerid, 0x0000BBAA, "Vous avez bien lancez une brиche /stopbreach pour l'arrиter.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://vignette2.wikia.nocookie.net/containmentbreach/images/c/cb/Intro3.ogg/revision/latest?cb=20130914185619");
halte(17);
PlayAudioStreamForPlayer(i, "http://vignette4.wikia.nocookie.net/containmentbreach/images/2/22/Alarm2.ogg/revision/latest?cb=20130914185645");
halte(7);
PlayAudioStreamForPlayer(i, "https://hydra-media.cursecdn.com/scpcb.gamepedia.com/f/f3/HCZ_Background.ogg");
halte(46);
StopAudioStreamForPlayer(i);
}
}
else
{
SendClientMessage(playerid, 0xAA3333AA,"[ERREUR]Vous devez кtre administrateur.");
return 1;
}
return 1;
}
CMD:stopbreach(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
if (GetPVarInt(playerid, "BREACH") == 0) return SendClientMessage(playerid, 0xAA3333AA, "[ERREUR]Vous n'avez pas dйmarer de brиche !");
SendClientMessage(playerid, 0x0000BBAA, "Vous avez bien arreter la brиche.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/khpcjp7zmg/682battle.ogg");
halte(54);
PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/0k00bwkd58/Alarm3.ogg");
halte(5);
PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/jygnbu8r2i/nuke1.ogg");
halte(7);
StopAudioStreamForPlayer(i);
}
}
else
{
SendClientMessage(playerid, 0xAA3333AA,"[ERREUR]Vous devez кtre administrateur.");
return 1;
}
return 1;
}
PHP код:
CMD:scp106(playerid, params[])
{
if (GetPVarInt(playerid, "SCP106") == 1) return SendClientMessage(playerid, 0xAA3333AA, "[ERREUR]Tu est dйjа en SCP 106!");
// later SetPlayerPos(playerid, 0.0, 0.0, 0.0);
SetPlayerSkin(playerid, 160);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/pea0l5s90k/SCP_Containment_Breach_-_SCP-106_Theme_Bump_In_The_Night.ogg");
halte(123);
PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/pea0l5s90k/SCP_Containment_Breach_-_SCP-106_Theme_Bump_In_The_Night.ogg");
halte(123);
StopAudioStreamForPlayer(i);
}
return 1;
}
CMD:stopscp106(playerid, params[])
{
if (GetPVarInt(playerid, "SCP106") == 0) return SendClientMessage(playerid, 0xAA3333AA, "[ERREUR]Tu n'est pas en SCP 106!");
for(new i = 0; i < MAX_PLAYERS; i++)
{
StopAudioStreamForPlayer(i);
}
return 1;
}
edit : oh i have forget that :
PHP код:
halte(seconds)
{
new _nouveauTemps[4], _ancienTemps[4];
gettime(_ancienTemps[0], _ancienTemps[1],_ancienTemps[2]);
_ancienTemps[3] = _ancienTemps[2] + (_ancienTemps[1] * 60) + (_ancienTemps[0] * 600);
while(_nouveauTemps[3] != (_ancienTemps[3] + seconds))
{
gettime(_nouveauTemps[0], _nouveauTemps[1], _nouveauTemps[2]);
_nouveauTemps[3] = _nouveauTemps[2] + (_nouveauTemps[1] * 60) + (_nouveauTemps[0] * 600);
}
}