COMMAND:estrelas(playerid, params[])
{
new OtherPlayer, Stars;
// Send the command to all admins so they can see it
SendAdminText(playerid, "/estrelas", 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] >= 2)
{
if (sscanf(params, "ui", OtherPlayer, Stars)) SendClientMessage(playerid, 0xFF0000AA, "Use: /estrelas [id] [nivel]");
else
if (IsPlayerConnected(OtherPlayer))
SetPlayerWantedLevel ( playerid, GetPlayerWantedLevel(playerid));
else
SendClientMessage(playerid, 0xFF0000FF, "{FF0000}Esse jogador nгo estб online.");
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
COMMAND:estrelas(playerid, params[])
{
new OtherPlayer, Stars, string[100];
OtherPlayer = strval(params);
// Send the command to all admins so they can see it
SendAdminText(playerid, "/estrelas", 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] >= 2)
{
if (sscanf(params, "ui", OtherPlayer, Stars)) SendClientMessage(playerid, 0xFF0000AA, "Use: /estrelas [id] [nivel]");
else
if (IsPlayerConnected(OtherPlayer))
SetPlayerWantedLevel ( playerid, Stars);
format(string, sizeof(string), "Vocк setou as estrelas do id: %i para %i", OtherPlayer, Stars);
SendClientMessage(playerid, -1, string);
else
SendClientMessage(playerid, 0xFF0000FF, "{FF0000}Esse jogador nгo estб online.");
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
Vocк quer que as estrelas sejam setadas para o id desejado?
Testa ai vк se й oque vocк quer. PHP код:
|
COMMAND:estrelas(playerid, params[])
{
new OtherPlayer, Stars, string[100];
OtherPlayer = strval(params);
// Send the command to all admins so they can see it
SendAdminText(playerid, "/estrelas", 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] >= 2)
{
if (sscanf(params, "ui", OtherPlayer, Stars)) SendClientMessage(playerid, 0xFF0000AA, "Use: /estrelas [id] [nivel]");
else
if (IsPlayerConnected(OtherPlayer))
SetPlayerWantedLevel ( playerid, Stars);
format(string, sizeof(string), "Vocк setou as estrelas do id: %i para %i", OtherPlayer, Stars);
SendClientMessage(playerid, -1, string);
else
SendClientMessage(playerid, 0xFF0000FF, "{FF0000}Esse jogador nгo estб online.");
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
COMMAND:estrelas(playerid, params[])
{
new OtherPlayer, Stars, string[100];
OtherPlayer = strval(params);
SendAdminText(playerid, "/estrelas", params);
if(APlayerData[playerid][LoggedIn] == true){
if(APlayerData[playerid][PlayerLevel] >= 2){
if(sscanf(params, "ui", OtherPlayer, Stars)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /estrelas [id] [nivel]");
if(IsPlayerConnected(OtherPlayer)){
SetPlayerWantedLevel ( playerid, Stars);
format(string, sizeof(string), "Vocк setou as estrelas do id: %i para %i", OtherPlayer, Stars);
SendClientMessage(playerid, -1, string);
}else{
SendClientMessage(playerid, 0xFF0000FF, "{FF0000}Esse jogador nгo estб online.");
}
}
}
return 1;
}