ZCMD help :)
#1

Hello guys!
Can someone make it ZCMD?

Код:
if(strcmp(cmd, "/rob247", true) == 0)
	{
	    	//_____________________24/7______________________
		if(PlayerInfo[playerid][pInt] == 18 || PlayerInfo[playerid][pInt] == 4 || PlayerInfo[playerid][pInt] == 6)
		{
         if(IsPlayerInRangeOfPoint(playerid,100,-30.875, -88.9609, 1004.53))
	        {
	            if(IsACop(playerid)||PlayerInfo[playerid][pLeader] == 7||PlayerInfo[playerid][pMember] == 7)
		        {
		            SendClientMessage(playerid,0xAA3333AA,"Du bist ein GESETZES HЬTER!");
		            return 1;
				}
		        if(rob_24_7)
		        {
		            SendClientMessage(playerid,0xAA3333AA,"Der 24/7 wurde gerade erst ьberfallen!");
		            return 1;
		        }
		        rob_24_7 = 1;
		        SetTimer("Rob_Reset_24_7",10800000,0); // Nach 4 Stunden erst wieder ausrauben
		        SetTimerEx("Rob_UnFreeze_24_7",35000,0,"i",playerid); // Nach 35 sek Bank ьberfallen
		        OnPlayerCommandText(playerid,"/s Hдnde hoch das ist ein Ьberfall");
		        WantedPoints[playerid] += 1;
				SetPlayerCriminal(playerid,255, "24/7 Shop Raub!");
				SetPlayerWantedLevel(playerid, 1);
				WantedLevel[playerid] += 1;
		        SendClientMessage(playerid,0xFF9933FF,"Du willst den 24/7 Shop ьberfallen und musst warten bis das Geld eingepackt ist!");
		        SendClientMessage(playerid,0xFF9933FF,"Verlasse vorher nicht den 24/7 Shop!");
		        for(new i; i < GetMaxPlayers(); i++)
		        {
		            if(IsPlayerConnected(i) && i != INVALID_PLAYER_ID)
		            {
		                if(IsACop(i))
		                {
	             			SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Achtung Alle Einheiten! Eine Meldung vom 24/7 Security System!");
			                SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Ein 24/7 Shop wurde grade Ьberfallen!");
		                }
		            }
		        }
			}
	        else
			{
				SendClientMessage(playerid,0xAA3333AA,"Du bist nicht in einem 24/7 Shop!");
			}
		}
		return 1;
	}
Reply
#2

You only had to change the header of the command...
-> You can't use spaces or special letters in the command, I guess?
pawn Код:
CMD:rob247(playerid, params[])
{
    if(PlayerInfo[playerid][pInt] == 18 || PlayerInfo[playerid][pInt] == 4 || PlayerInfo[playerid][pInt] == 6)
    {
        if(IsPlayerInRangeOfPoint(playerid,100,-30.875, -88.9609, 1004.53))
        {
            if(IsACop(playerid)||PlayerInfo[playerid][pLeader] == 7||PlayerInfo[playerid][pMember] == 7)
            {
                SendClientMessage(playerid,0xAA3333AA,"Du bist ein GESETZES H?TER!");
                return 1;
            }
            if(rob_24_7)
            {
                SendClientMessage(playerid,0xAA3333AA,"Der 24/7 wurde gerade erst ?berfallen!");
                return 1;
            }
            rob_24_7 = 1;
            SetTimer("Rob_Reset_24_7",10800000,0); // Nach 4 Stunden erst wieder ausrauben
            SetTimerEx("Rob_UnFreeze_24_7",35000,0,"i",playerid); // Nach 35 sek Bank ?berfallen
            OnPlayerCommandText(playerid,"/s H?nde hoch das ist ein ?berfall");
            WantedPoints[playerid] += 1;
            SetPlayerCriminal(playerid,255, "24/7 Shop Raub!");
            SetPlayerWantedLevel(playerid, 1);
            WantedLevel[playerid] += 1;
            SendClientMessage(playerid,0xFF9933FF,"Du willst den 24/7 Shop ?berfallen und musst warten bis das Geld eingepackt ist!");
            SendClientMessage(playerid,0xFF9933FF,"Verlasse vorher nicht den 24/7 Shop!");
            for(new i; i < GetMaxPlayers(); i++)
            {
                if(IsPlayerConnected(i) && i != INVALID_PLAYER_ID)
                {
                    if(IsACop(i))
                    {
                        SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Achtung Alle Einheiten! Eine Meldung vom 24/7 Security System!");
                        SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Ein 24/7 Shop wurde grade ?berfallen!");
                    }
                }
            }
        }
        else SendClientMessage(playerid,0xAA3333AA,"Du bist nicht in einem 24/7 Shop!");
    }
    return 1;
}
Reply
#3

also dont place the script he pasted inside OnPlayerCommandText. instead place it outside any callbacks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)