Asszem valami ilyesmire gondolhatsz
Ha nem mûködik írj rám skypeon, régi módomból operáltam ki
//gm elejére
new roadblocktimer = 0;
forward ResetRoadblockTimer();
//onplayercommand alá
if(strcmp(cmdtext, \"/útzár-lerak\", true)==0 || strcmp(cmdtext, \"/utzar-lerak\", true)==0)
{
if (PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1 && PlayerInfo[playerid][pMember] != 9 && PlayerInfo[playerid][pLeader] != 9 && PlayerInfo[playerid][szervTag] != 4 && PlayerInfo[playerid][szervLeader] != 4) return SendClientMessage(playerid, COLOR_GREY, \"Te nem vagy zsaru!\");
if (PlayerInfo[playerid][pRoadblock] != 0) return SendClientMessage(playerid, COLOR_GREY, \"Csak egy útzárat rakhatsz.\");
if (roadblocktimer != 0) return SendClientMessage(playerid, COLOR_GREY, \"Kicsit várnod kell mire újjat rakhatsz!\");
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
PlayerInfo[playerid][pRoadblock] = CreateObject(3578, X, Y, Z-0.5, 0.0, 0.0, A+180);
SetPlayerPos(playerid, X, Y, Z+4);
GameTextForPlayer(playerid, \"~w~Útzár ~r~Lerakva\", 5000, 5);
SendClientMessage(playerid, COLOR_GREEN, \"Akadály lerakva, /útzár-lebont ha el akarod tüntetni.\");
roadblocktimer = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), \"\", sendername);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[pMember] == 1 || PlayerInfo[pLeader] == 1 || PlayerInfo[pMember] == 9 || PlayerInfo[pLeader] == 9)
{
SetPlayerCheckpoint(playerid, X, Y, Z-10, 1.0);
SendClientMessage(i, TEAM_BLUE_COLOR, string);
if (PlayerInfo[pRank] >= 5 && PlayerInfo[pMember] || PlayerInfo[pLeader] == 1)
{
SendClientMessage(i, COLOR_YELLOW, \"\");
}
}
}
}
SetTimer(\"ResetRoadblockTimer\", 10, false);
return 1;
}
if(strcmp(cmdtext, \"/útzár-lebont\", true)==0 || strcmp(cmdtext, \"/utzar-lebont\", true)==0)
{
if (PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1 && PlayerInfo[playerid][pMember] != 9 && PlayerInfo[playerid][pLeader] != 9 && PlayerInfo[playerid][szervTag] != 4 && PlayerInfo[playerid][szervLeader] != 4)
{
SendClientMessage(playerid, COLOR_GREY, \"Te nem vagy rendõr!\");
return 1;
}
if (PlayerInfo[playerid][pRank] < 0)
{
SendClientMessage(playerid, COLOR_GREY, \"Nem kell szint ahoz hogy használhasd ezt a parancsot!\");
return 1;
}
if (PlayerInfo[playerid][pRoadblock] == 0)
{
SendClientMessage(playerid, COLOR_GREY, \"Itt nincs útzár!\");
return 1;
}
RemoveRoadblock(playerid);
SendClientMessage(playerid, COLOR_GREEN, \"Útzár eltûntetve.\");
return 1;
}
//a GM leg aljára
public ResetRoadblockTimer()
{
roadblocktimer = 0;
return 1;
}