21.09.2015, 15:17
Hello, straight to the problem, here's the script:
CMD:givescore(playerid, params[])
{
if (PlayerInfo[playerid][pPriz] >= 1)
{
new string[128], giveplayerid, score;
new VBName[MAX_PLAYER_NAME], VBName1[MAX_PLAYER_NAME];
GetPlayerName(playerid, VBName, MAX_PLAYER_NAME);
GetPlayerName(giveplayerid, VBName1, MAX_PLAYER_NAME);
if(sscanf(params, "dd", giveplayerid, score)) return SendClientMessage(playerid, COLOR_PURPLE, "Naudojimas: /givescore [ћaidėjoid] [taљkai]");
if(IsPlayerConnected(giveplayerid))
{
givescore(giveplayerid, score);
format(string, sizeof(string), "Admin'as %s davė %s %d taљkų.", VBName, VBName1, score);
SendStaffMessage(COLOR_DRED, string);
}
}
return 1;
}
Is there a way that not only player who is pPriz could use this command? Like one that is pSav can use it.
CMD:givescore(playerid, params[])
{
if (PlayerInfo[playerid][pPriz] >= 1)
{
new string[128], giveplayerid, score;
new VBName[MAX_PLAYER_NAME], VBName1[MAX_PLAYER_NAME];
GetPlayerName(playerid, VBName, MAX_PLAYER_NAME);
GetPlayerName(giveplayerid, VBName1, MAX_PLAYER_NAME);
if(sscanf(params, "dd", giveplayerid, score)) return SendClientMessage(playerid, COLOR_PURPLE, "Naudojimas: /givescore [ћaidėjoid] [taљkai]");
if(IsPlayerConnected(giveplayerid))
{
givescore(giveplayerid, score);
format(string, sizeof(string), "Admin'as %s davė %s %d taљkų.", VBName, VBName1, score);
SendStaffMessage(COLOR_DRED, string);
}
}
return 1;
}
Is there a way that not only player who is pPriz could use this command? Like one that is pSav can use it.