18.07.2015, 20:34
I have that cmd on my trucking server,maybe it will help...
PHP код:
// Increases the player's wanted level by 1
COMMAND:wanted(playerid, params[])
{
new OtherPlayer, Stars;
// Send the command to all admins so they can see it
SendAdminText(playerid, "/trazen", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 5
if (APlayerData[playerid][PlayerLevel] >= 5)
{
if (sscanf(params, "ui", OtherPlayer, Stars)) SendClientMessage(playerid, 0xFF0000AA, "Command: \"/wanted <player> <Stars>\"");
else
if (IsPlayerConnected(OtherPlayer)) // If the player is a valid playerid (he's connected)
PostaviWantedLevel(OtherPlayer, Stars);
else
SendClientMessage(playerid, 0xFF0000FF, "That player is not online");
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}