Jump to content

Recommended Posts

Posted

Deci vreau si eu o comanda in care sa fie folosita doar de admin 7 si sa zica gen 

/salute 

Kround va salutat pe toti playeri

Posted
CMD:salute(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 7) // aici verifica daca jucatorul are admin nivel 7, poti modifica in functie de gamemodeul tau.
    {
        format(string, sizeof(string), "AdmInfo: %s va saluta pe toti!", GetName(playerid)); // aici este un string care verifica care e 	    numele jucatorului si il transmite in mesaj.
        SendClientMessageToAll(0xFF0000AA, string); // aici trimiti mesajul tuturor jucatorilor.
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "Ai nevoie de administrator nivel 7 pentru a folosi aceasta comanda!"); // daca nu ai admin level 7 vei primi aceasta eroare.
    return 1;
}

Sper ca te-am ajutat.

Posted
Acum 10 minute, BaFFyJunior a spus:

CMD:salute(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 7) // aici verifica daca jucatorul are admin nivel 7, poti modifica in functie de gamemodeul tau.
    {
        format(string, sizeof(string), "AdmInfo: %s va saluta pe toti!", GetName(playerid)); // aici este un string care verifica care e 	    numele jucatorului si il transmite in mesaj.
        SendClientMessageToAll(0xFF0000AA, string); // aici trimiti mesajul tuturor jucatorilor.
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "Ai nevoie de administrator nivel 7 pentru a folosi aceasta comanda!"); // daca nu ai admin level 7 vei primi aceasta eroare.
    return 1;
}

Sper ca te-am ajutat.

D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(16457) : error 017: undefined symbol "string"
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(16457) : error 017: undefined symbol "string"
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(16457) : error 029: invalid expression, assumed zero
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(16457) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
 

Posted (edited)
1 minute ago, xXDANYXx121 said:

D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(16457) : error 017: undefined symbol "string"
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(16457) : error 017: undefined symbol "string"
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(16457) : error 029: invalid expression, assumed zero
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(16457) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
 

CMD:salute(playerid, params[])
{
    new string[128];
    if(PlayerInfo[playerid][pAdmin] >= 7) // aici verifica daca jucatorul are admin nivel 7, poti modifica in functie de gamemodeul tau.
    {
        format(string, sizeof(string), "AdmInfo: %s va saluta pe toti!", GetName(playerid)); // aici este un string care verifica care e 	    numele jucatorului si il transmite in mesaj.
        SendClientMessageToAll(0xFF0000AA, string); // aici trimiti mesajul tuturor jucatorilor.
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "Ai nevoie de administrator nivel 7 pentru a folosi aceasta comanda!"); // daca nu ai admin level 7 vei primi aceasta eroare.
    return 1;
}

 

 

Edited by BaFFyJunior
Posted
Acum 7 minute, BaFFyJunior a spus:

CMD:salute(playerid, params[])
{
    new string[128];
    if(PlayerInfo[playerid][pAdmin] >= 7) // aici verifica daca jucatorul are admin nivel 7, poti modifica in functie de gamemodeul tau.
    {
        format(string, sizeof(string), "AdmInfo: %s va saluta pe toti!", GetName(playerid)); // aici este un string care verifica care e 	    numele jucatorului si il transmite in mesaj.
        SendClientMessageToAll(0xFF0000AA, string); // aici trimiti mesajul tuturor jucatorilor.
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "Ai nevoie de administrator nivel 7 pentru a folosi aceasta comanda!"); // daca nu ai admin level 7 vei primi aceasta eroare.
    return 1;
}

 

 

D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(33440) : error 021: symbol already defined: "@yC_salute"
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(33440) : error 084: state conflict: one of the states is already assigned to another implementation (symbol "@yC_salute")
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(33440) : error 084: state conflict: one of the states is already assigned to another implementation (symbol "@yC_salute")
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(33440) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
 

Posted (edited)
1 minute ago, xXDANYXx121 said:

D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(33440) : error 021: symbol already defined: "@yC_salute"
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(33440) : error 084: state conflict: one of the states is already assigned to another implementation (symbol "@yC_salute")
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(33440) : error 084: state conflict: one of the states is already assigned to another implementation (symbol "@yC_salute")
D:\GAMEMODE RPG.RP BUNE\GM Bun\gamemodes\GM.pwn(33440) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
 

Inlocuieste CMD:salute cu altceva, CMD:... si vezi daca merge, el spune ca simbolul salute exista deja.

Comenzile tale sunt pe ysi sau pe zcmd?

Edited by BaFFyJunior
Posted

#include                 <a_samp>
#include                 <a_mysql>
#include                 <streamer>
#include                 <playerzone>
#include                 <foreach>
#include                 <sscanf2>
#include                 <mSelection>
#include                 <a_zones>
#include                 <beaZone>
#include                 <fly>
#include                 <timestamptodate>
#include                 <firework>
#include                 <OPA>
#include                 <md5>
#include                <YSI\y_commands>
#include                <YSI\y_master>
#include                 <crashdetect>

Posted
Acum 5 minute, BaFFyJunior a spus:

Inlocuieste CMD:salute cu altceva, CMD:... si vezi daca merge, el spune ca simbolul salute exista deja.

Comenzile tale sunt pe ysi sau pe zcmd?

Tu ai pus salute si eu am salute la animatie

Posted (edited)

Atunci pune cmd:salutari. Daca nu merge si la comenzi in loc de CMD ai YCMD inlocuieste asa:

YCMD:salutari(playerid, params[], help)

Edited by BaFFyJunior

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.