Jump to content
  • 0

comanda zcmd


vasy

Question

cum as putea sa fac aceasta comanda

[pawn]COMMAND:wanted(playerid, params[])

{

new OtherPlayer, Stars;

// Send the command to all admins so they can see it

SendAdminText(playerid, "/wanted", params);

// Check if the player has logged in

if (APlayerData[playerid][LoggedIn] == true)

{

// Check if the player's admin-level is at least 2

if (APlayerData[playerid][PlayerLevel] >= 3)

{

if (sscanf(params, "ui", OtherPlayer, Stars)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/wanted <OtherPlayer> <Stars>\"");

else

if (IsPlayerConnected(OtherPlayer)) // If the player is a valid playerid (he's connected)

SetPlayerWantedLevel(OtherPlayer, Stars);

else

    SendClientMessage(playerid, 0xFF0000FF, "{515151}Jucatorul nu este online");

}

else

    return 0;

}

else

    return 0;

// Let the server know that this was a valid command

return 1;

}

[/pawn]

sa o fac sa nu mai fie pe playerid sa fie all, adica cand scriu /wanted sa ia stelele la tot serverul

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Uite mura-n gura ;)

[pawn]

COMMAND:wanted(playerid, params[])

{

new Stars;

// Send the command to all admins so they can see it

SendAdminText(playerid, "/wanted", params);

    // Check if the player has logged in

    if (APlayerData[playerid][LoggedIn] == true)

    {

    if (APlayerData[playerid][PlayerLevel] >= 3)

    {

    if (sscanf(params, "i",Stars)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /wanted <Stars>\"");

    for(new i=0;i<MAX_PLAYERS;i++)

    {

    SetPlayerWantedLevel(i,Stars);

    }

    }

    }

    return 1;

}

[/pawn]

Link to comment
Share on other sites

[pawn]C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(1331) : warning 219: local variable "Stars" shadows a variable at a preceding level

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(5508) : error 001: expected token: ")", but found "&"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(5508) : error 001: expected token: ";", but found "&"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(5513) : error 010: invalid function or declaration

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(5513) : error 021: symbol already defined: "SendAdminText"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(5516) : error 010: invalid function or declaration

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(5518) : error 010: invalid function or declaration

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(5520) : error 010: invalid function or declaration

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(5521) : error 010: invalid function or declaration

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_PlayerCommands.inc(5527) : error 010: invalid function or declaration[/pawn]

mura-n gura da nu merge oricum apreciez, uite si ce errori mia dat

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Link to comment
Share on other sites

am rezolvat eu ai pus tu

[pawn]COMMAND:wantedall(playerid, params[])[/pawn]

in loc de

[pawn]COMMAND:wantedall(playerid, params [])[/pawn]

am rezolvat multumesc dati tc

p.s ai +1 de la mine

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.