28.08.2013, 00:13
Anyone knows how to save it? Searched it but didn't find anything.
pawn Код:
CMD:setm4skill(playerid, params[])
{
new string[128], giveplayerid, skill;
if(sscanf(params, "ud", giveplayerid, skill))
{
SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /setm4skill [playerid] [skill level]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1338) {
if(IsPlayerConnected(giveplayerid)) {
if(giveplayerid != INVALID_PLAYER_ID)
{
SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_M4, skill);
format(string, sizeof(string), "You have set %s's M4 skill to %d.", GetPlayerNameEx(giveplayerid), skill);
SendClientMessageEx(playerid, COLOR_WHITE, string);
}
}
else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
}
else {
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}