here is the /nextmap <- this one doesn't bug...
Код:
if(strcmp(cmd, "/nextmap", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 2)
{
SetTimer("Nextmap", 2000, 0);
for(new i = 0; i < MAX_PLAYERS; i++)
{
TogglePlayerControllable(i, 0);
}
}
}
return 1;
}
And yea' I found a thing that... if The bomb gets Defused bu CT's there is a different bug... The map changes, but there appears a notice like : ''Counter-Terorists win'', ''Counter-Terorists'' win. ..again and again like maybe each 2 secound.
/plantbomb code :
Код:
if (strcmp("/plantbomb", cmdtext, true, 6) == 0 && gTeam[playerid] == TEAM_TT)
{
if(IsPlayerInCheckpoint(playerid))
{
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have successfully planted the bomb!");
GameTextForAll("~r~ The bomb has been planted!", 3000, 5);
DisablePlayerCheckpoint(playerid);
IsBombPlanted = 1;
SetTimer("Counter", 1000, 1);
Count = 60;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You can only plant the bomb in the checkpoint!");
return 1;
}
}
/defuse code
Код:
if (strcmp("/defuse", cmdtext, true, 7) == 0 && gTeam[playerid] == TEAM_CT)
{
if(IsPlayerInCheckpoint(playerid) && IsBombPlanted)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You must type '/27379384' to defuse the bomb quickly!");
DefuseCode = 1;
return 1;
}
else if(IsPlayerInCheckpoint(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "The bomb hasn't been planted yet!");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You can only defuse the bomb in the checkpoint!");
return 1;
}
}
//==============================================================================
if (strcmp("/27379384", cmdtext, true, 9) == 0 && gTeam[playerid] == TEAM_CT)
{
if(IsPlayerInCheckpoint(playerid) && IsBombPlanted && DefuseCode)
{
Defused = 1;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You succesfully defused the bomb!");
DisablePlayerCheckpoint(playerid);
GameTextForAll("The bomb has been defused!", 3000, 5);
GameTextForAll("~w~ The round is over, ~b~Counter Terrorists ~w~win!", 1000, 5);
SetTimer("Nextmap", 2000, 0);
return 1;
}
else if(IsPlayerInCheckpoint(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "The bomb has not been planted!");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You can only defuse the bomb in the checkpoint!");
return 1;
}
}
And Maybe something is wrong with this too ?
Код:
public SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
if(SpecReturnPosDue[playerid] == 1)
{
SetPlayerInterior(playerid, Unspec[playerid][sPint]);
SetPlayerVirtualWorld(playerid, Unspec[playerid][sVw]);
SetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
SetPlayerFacingAngle(playerid, Unspec[playerid][sAngle]);
SpecReturnPosDue[playerid] = 0;
RestoreWeapons(playerid);
TogglePlayerControllable(playerid, 1);
return 1;
}
if(Map == 1)
{
if(gTeam[playerid] == TEAM_CT)
{
SetPlayerPos(playerid, 3163.6218, -1168.4437, 30.3423);
SetPlayerFacingAngle(playerid, 270.0665);
SetPlayerInterior(playerid, 0);
SetPlayerCheckpoint(playerid,3200.0686,-1114.0719,34.3727,5.0);
PlayerInfo[playerid][pSdpistol] = 1;
PlayerInfo[playerid][pShotgun] = 1;
PlayerInfo[playerid][pM4] = 1;
PlayerInfo[playerid][pAK47] = 0;
PlayerInfo[playerid][pTear] = 1;
RestoreWeapons(playerid);
SetPlayerColor(playerid,BLUE);
SetPlayerTeam(playerid, TEAM_CT);
TogglePlayerControllable(playerid, 1);
}
else if(gTeam[playerid] == TEAM_TT)
{
SetPlayerPos(playerid, 3147.8560, -1248.1599, 57.9542);
SetPlayerFacingAngle(playerid, 360.0);
SetPlayerInterior(playerid, 0);
SetPlayerCheckpoint(playerid,3200.0686,-1114.0719,34.3727,5.0);
PlayerInfo[playerid][pSdpistol] = 1;
PlayerInfo[playerid][pShotgun] = 1;
PlayerInfo[playerid][pAK47] = 1;
PlayerInfo[playerid][pM4] = 0;
PlayerInfo[playerid][pTear] = 1;
RestoreWeapons(playerid);
SetPlayerColor(playerid,RED);
SetPlayerTeam(playerid, TEAM_TT);
TogglePlayerControllable(playerid, 1);
}
return 1;
}
if(Map == 2)
{
if(gTeam[playerid] == TEAM_CT)
{
SetPlayerPos(playerid, -1360.97290, -81.179328, 14.146192);
SetPlayerFacingAngle(playerid, 360.0);
SetPlayerInterior(playerid, 0);
SetPlayerCheckpoint(playerid,-1395.678833,-107.936225,30.302179,5.0);
PlayerInfo[playerid][pSdpistol] = 1;
PlayerInfo[playerid][pShotgun] = 1;
PlayerInfo[playerid][pM4] = 1;
PlayerInfo[playerid][pAK47] = 0;
PlayerInfo[playerid][pTear] = 1;
RestoreWeapons(playerid);
SetPlayerColor(playerid,BLUE);
SetPlayerTeam(playerid, TEAM_CT);
TogglePlayerControllable(playerid, 1);
}
else if(gTeam[playerid] == TEAM_TT)
{
SetPlayerPos(playerid, -1267.509277, -196.905258, 14.148437);
SetPlayerFacingAngle(playerid, 360.0);
SetPlayerInterior(playerid, 0);
SetPlayerCheckpoint(playerid,-1395.678833,-107.936225,30.302179,5.0);
PlayerInfo[playerid][pSdpistol] = 1;
PlayerInfo[playerid][pShotgun] = 1;
PlayerInfo[playerid][pAK47] = 1;
PlayerInfo[playerid][pM4] = 0;
PlayerInfo[playerid][pTear] = 1;
RestoreWeapons(playerid);
SetPlayerColor(playerid,RED);
SetPlayerTeam(playerid, TEAM_TT);
TogglePlayerControllable(playerid, 1);
}
return 1;
}
if(Map == 3)
{
if(gTeam[playerid] == TEAM_CT)
{
SetPlayerPos(playerid, -1932.6234, 1605.1670, 27.5018);
SetPlayerFacingAngle(playerid, 360.0);
SetPlayerInterior(playerid, 0);
SetPlayerCheckpoint(playerid,-1954.502685,1681.233032,27.429172,5.0);
PlayerInfo[playerid][pSdpistol] = 1;
PlayerInfo[playerid][pShotgun] = 1;
PlayerInfo[playerid][pM4] = 1;
PlayerInfo[playerid][pAK47] = 0;
PlayerInfo[playerid][pTear] = 1;
RestoreWeapons(playerid);
SetPlayerColor(playerid,BLUE);
SetPlayerTeam(playerid, TEAM_CT);
TogglePlayerControllable(playerid, 1);
}
else if(gTeam[playerid] == TEAM_TT)
{
SetPlayerPos(playerid, -2273.5742, 1655.1820, 48.3878);
SetPlayerFacingAngle(playerid, 360.0);
SetPlayerInterior(playerid, 0);
SetPlayerCheckpoint(playerid,-1954.502685,1681.233032,27.429172,5.0);
PlayerInfo[playerid][pSdpistol] = 1;
PlayerInfo[playerid][pShotgun] = 1;
PlayerInfo[playerid][pAK47] = 1;
PlayerInfo[playerid][pM4] = 0;
PlayerInfo[playerid][pTear] = 1;
RestoreWeapons(playerid);
SetPlayerColor(playerid,RED);
SetPlayerTeam(playerid, TEAM_TT);
TogglePlayerControllable(playerid, 1);
}
return 1;
}
if(Map == 4)
{
if(gTeam[playerid] == TEAM_CT)
{
SetPlayerPos(playerid, 2228.8044, -1728.7825, 13.3828);
SetPlayerFacingAngle(playerid, 270.0665);
SetPlayerInterior(playerid, 0);
SetPlayerCheckpoint(playerid,2266.4419,-1699.7832,13.6901,5.0);
PlayerInfo[playerid][pSdpistol] = 1;
PlayerInfo[playerid][pShotgun] = 1;
PlayerInfo[playerid][pM4] = 1;
PlayerInfo[playerid][pAK47] = 0;
PlayerInfo[playerid][pTear] = 1;
RestoreWeapons(playerid);
SetPlayerColor(playerid,BLUE);
SetPlayerTeam(playerid, TEAM_CT);
TogglePlayerControllable(playerid, 1);
}
else if(gTeam[playerid] == TEAM_TT)
{
SetPlayerPos(playerid, 2507.7942, -1686.9944, 13.5540);
SetPlayerFacingAngle(playerid, 360.0);
SetPlayerInterior(playerid, 0);
SetPlayerCheckpoint(playerid,2266.4419,-1699.7832,13.6901,5.0);
PlayerInfo[playerid][pSdpistol] = 1;
PlayerInfo[playerid][pShotgun] = 1;
PlayerInfo[playerid][pAK47] = 1;
PlayerInfo[playerid][pM4] = 0;
PlayerInfo[playerid][pTear] = 1;
RestoreWeapons(playerid);
SetPlayerColor(playerid,RED);
SetPlayerTeam(playerid, TEAM_TT);
TogglePlayerControllable(playerid, 1);
}
return 1;
}
}
return 1;
}