Application

Započeo [OG]undeR.
16. Apr. 2012.
869
pregleda
7
postova
dingospo.TITO
4
Enforcer
16. Apr. 2012.
Radim jedan program za pocetnike u pawn jeziku, i zelim da im olaksam ne samo njima, vec i ostalima neke stvari. U programu ce biti neke korisne skripte, zcmd i ostala 2(napisao sam ali sam zab imena 😄)pa mi trebaju neke korisne skripte...
dingospo.TITO
4
Enforcer
16. Apr. 2012.
komande...
Vedran_Valentic
3
Rookie
17. Apr. 2012.
CMD:energy(playerid, params[])
    {
        if(PlayerInfo >= 5)
        {
            SetPlayerHealth(playerid, 100); //if he's allowed, restore his health
            SendClientMessage(playerid, COLOR_GREY, "Health has been restored to 100."); // and send him the success-message
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!"); // if not, send him only the following message
        }
        return 1;
    }

CMD:kick(playerid, params[])
    {
        if(PlayerInfo >= 3) {
            new PID; //define the playerid we wanna kick
            new reason; //the reason, put into a string
            new str; //a new message string
            new Playername, Adminname; //defines the function with the playername we wanna get
            GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
            GetPlayerName(PID, Playername, sizeof(Playername));
            if(sscanf(params, "us", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick "); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)

            if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
                return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");

            format(str, sizeof(str), "'%s' has been kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
        SendClientMessageToAll(COLOR_RED, str); //send that message to all
        Kick(PID); //kick the playerid we've defined

        }
        else //if he has not got the permissions
        {
            SendClientMessage(playerid, COLOR_GREY, "You have to be level 3 to use that command!"); //return this message
        }
        return 1;
    }

CMD:ban(playerid, params[])
    {
        if(PlayerInfo >= 3) {
            new PID; //define the playerid we wanna ban
            new reason; //the reason, put into a string
            new str; //a new message string
            new Playername, Adminname; //defines the function with the playername we wanna get
            GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
            GetPlayerName(PID, Playername, sizeof(Playername));
            if(sscanf(params, "us", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick "); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)

            if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
                return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");

            format(str, sizeof(str), "'%s' has been banned by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
        SendClientMessageToAll(COLOR_RED, str); //send that message to all
        Ban(PID); //Ban the playerid we've defined

        }
        else //if he has not got the permissions
        {
            SendClientMessage(playerid, COLOR_GREY, "You have to be level 5 to use that command!"); //return this message
        }
        return 1;
    }

COMMAND:clearchat(playerid,params[])
{
  if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You must be level 1 to use this command!" );
{
    for( new i = 0; i <= 100; i ++ ) SendClientMessageToAll( COLOR_WHITE, "" );
}  return 1;
}
kiddo
4
Shot Caller
17. Apr. 2012.
CMD:freeze(playerid, params[])
{
new id;
if(PlayerInfo < 1) return SCM(playerid,COLOR_RED,"Nisi ovlasten za koristenje ove komande.");
if(sscanf(params,"u", id)) return SCM(playerid, COLOR_WHITE,"KORISTI: /freeze [ID/Dio imena]");
if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_RED,"Taj igrac nije online.");
else
{
    TogglePlayerControllable(id, 0);
}
return 1;
}
CMD:unfreeze(playerid, params[])
{
new id;
if(PlayerInfo < 1) return SCM(playerid,COLOR_RED,"Nisi ovlasten za koristenje ove komande.");
if(sscanf(params,"u", id)) return SCM(playerid, COLOR_WHITE,"KORISTI: /unfreeze [ID/Dio imena]");
if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_RED,"Taj igrac nije online.");
else
{
    TogglePlayerControllable(id, 1);
}
return 1;
}


Kad povadim jos iz moda stavit cu ti.
dingospo.TITO
4
Enforcer
17. Apr. 2012.
a "CMD:" je..?
Vedran_Valentic
3
Rookie
17. Apr. 2012.
Quote from April 17, 2012, 5:56 pm:
a "CMD:" je..?

zcmd

kao sto si napiso u prvom postu
dingospo.TITO
4
Enforcer
17. Apr. 2012.
Pa upoznat sam sa tim, ali dok je jos bio strcp valjda u modi 😄  sad ove mesam zcmd i te fore :$

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha