CMD:sethitman(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] <= 1339 && PlayerInfo[playerid][pShopTech] == 0) return Error(playerid, "You are not authorized to use this command."); new giveplayerid, choice[32], string[128]; if(sscanf(params, "is[32]", giveplayerid, choice)) { SendClientMessageEx(playerid, COLOR_GRAD1, "USAGE: /sethitman [playerid] [weapon]"); SendClientMessageEx(playerid, COLOR_GRAD2, "Available names: 9mm, Silenced, Deagle, Shotgun, Sawnoff, Spas12, Uzi, MP5, M4, AK47"); return 1; } if(strcmp(choice, "9mm", true) == 0) { if(PlayerInfo[giveplayerid][p9mmSkill] == 1) { PlayerInfo[giveplayerid][p9mmSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_PISTOL, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the 9mm",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the 9mm",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][p9mmSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_PISTOL, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the 9mm",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the 9mm",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } if(strcmp(choice, "silenced", true) == 0) { if(PlayerInfo[giveplayerid][pSilencedSkill] == 1) { PlayerInfo[giveplayerid][pSilencedSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_PISTOL_SILENCED, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the Silenced Pistol",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the Silenced Pistol",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pSilencedSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_PISTOL_SILENCED, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the Silenced Pistol",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the Silenced Pistol",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } if(strcmp(choice, "deagle", true) == 0) { if(PlayerInfo[giveplayerid][pDeagleSkill] == 1) { PlayerInfo[giveplayerid][pDeagleSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_DESERT_EAGLE, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the Deagle",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the Deagle",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pDeagleSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_DESERT_EAGLE, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the Deagle",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the Deagle",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } if(strcmp(choice, "shotgun", true) == 0) { if(PlayerInfo[giveplayerid][pShotgunSkill] == 1) { PlayerInfo[giveplayerid][pShotgunSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_SHOTGUN, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the Shotgun",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the Shotgun",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pShotgunSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_SHOTGUN, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the Shotgun",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the Shotgun",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } if(strcmp(choice, "sawnoff", true) == 0) { if(PlayerInfo[giveplayerid][pSawnoffSkill] == 1) { PlayerInfo[giveplayerid][pSawnoffSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pSawnoffSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } if(strcmp(choice, "spas12", true) == 0) { if(PlayerInfo[giveplayerid][pSpasSkill] == 1) { PlayerInfo[giveplayerid][pSpasSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_SPAS12_SHOTGUN, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the Spas-12",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the Spas-12",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pSpasSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_SPAS12_SHOTGUN, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the Spas-12",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the Spas-12",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } if(strcmp(choice, "uzi", true) == 0) { if(PlayerInfo[giveplayerid][pUziSkill] == 1) { PlayerInfo[giveplayerid][pUziSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_MICRO_UZI, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the UZI",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the UZI",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pUziSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_MICRO_UZI, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the UZI",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the UZI",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } if(strcmp(choice, "mp5", true) == 0) { if(PlayerInfo[giveplayerid][pMp5Skill] == 1) { PlayerInfo[giveplayerid][pMp5Skill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_MP5, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the MP5",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the MP5",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pMp5Skill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_MP5, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the MP5",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the MP5",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } if(strcmp(choice, "ak47", true) == 0) { if(PlayerInfo[giveplayerid][pAKSkill] == 1) { PlayerInfo[giveplayerid][pAKSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_AK47, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the AK-47",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the AK-47",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pAKSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_AK47, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the AK-47",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the AK-47",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } if(strcmp(choice, "m4", true) == 0) { if(PlayerInfo[giveplayerid][pM4Skill] == 1) { PlayerInfo[giveplayerid][pM4Skill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_M4, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the M4",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the M4",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pM4Skill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_M4, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the M4",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the M4",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } OnPlayerStatsUpdate(giveplayerid); return 1; } To something like this CMD:sethitman(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] <= 1339 && PlayerInfo[playerid][pShopTech] == 0) return Error(playerid, "You are not authorized to use this command."); new giveplayerid, choice[32], string[128]; if(sscanf(params, "is[32]", giveplayerid, choice)) { SendClientMessageEx(playerid, COLOR_GRAD1, "USAGE: /sethitman [playerid] [weapon]"); SendClientMessageEx(playerid, COLOR_GRAD2, "Available names: 9mm, Sawnoff, Uzi"); return 1; } if(strcmp(choice, "9mm", true) == 0) { if(PlayerInfo[giveplayerid][p9mmSkill] == 1) { PlayerInfo[giveplayerid][p9mmSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_PISTOL, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the 9mm",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the 9mm",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][p9mmSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_PISTOL, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the 9mm",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the 9mm",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } if(strcmp(choice, "sawnoff", true) == 0) { if(PlayerInfo[giveplayerid][pSawnoffSkill] == 1) { PlayerInfo[giveplayerid][pSawnoffSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pSawnoffSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } if(strcmp(choice, "uzi", true) == 0) { if(PlayerInfo[giveplayerid][pUziSkill] == 1) { PlayerInfo[giveplayerid][pUziSkill] = 0; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_MICRO_UZI, 400); format(STRING, "AdmCmd: %s has taken %s's hitman skill on the UZI",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has taken your hitman skill on the UZI",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } else { PlayerInfo[giveplayerid][pUziSkill] = 1; SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_MICRO_UZI, 999); format(STRING, "AdmCmd: %s has given %s hitman skill on the UZI",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); SendAdminMessage(COLOR_LIGHTRED, string); Log("logs/csr.log", string); format(STRING, "Admin %s has given you hitman skill on the UZI",GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_WHITE, string); } } } OnPlayerStatsUpdate(giveplayerid); return 1; }
Do you mean the player skill level? https://sampwiki.blast.hk/wiki/SetPlayerSkillLevel
Maybe post your attempt so maybe we can understand and help you |
CMD:sethitman(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 1339 && PlayerInfo[playerid][pShopTech] == 0) return Error(playerid, "You are not authorized to use this command.");
new giveplayerid, choice[32], string[128];
if(sscanf(params, "is[32]", giveplayerid, choice))
{
SendClientMessageEx(playerid, COLOR_GRAD1, "USAGE: /sethitman [playerid] [weapon]");
SendClientMessageEx(playerid, COLOR_GRAD2, "Available names: 9mm, Sawnoff, Uzi");
return 1;
}
if(strcmp(choice, "9mm", true) == 0)
{
if(PlayerInfo[giveplayerid][p9mmSkill] == 1)
{
PlayerInfo[giveplayerid][p9mmSkill] = 0;
SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_PISTOL, 400);
format(STRING, "AdmCmd: %s has taken %s's hitman skill on the 9mm",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
SendAdminMessage(COLOR_LIGHTRED, string);
Log("logs/csr.log", string);
format(STRING, "Admin %s has taken your hitman skill on the 9mm",GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
}
else
{
PlayerInfo[giveplayerid][p9mmSkill] = 1;
SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_PISTOL, 999);
format(STRING, "AdmCmd: %s has given %s hitman skill on the 9mm",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
SendAdminMessage(COLOR_LIGHTRED, string);
Log("logs/csr.log", string);
format(STRING, "Admin %s has given you hitman skill on the 9mm",GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
}
}
if(strcmp(choice, "sawnoff", true) == 0)
{
if(PlayerInfo[giveplayerid][pSawnoffSkill] == 1)
{
PlayerInfo[giveplayerid][pSawnoffSkill] = 0;
SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 400);
format(STRING, "AdmCmd: %s has taken %s's hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
SendAdminMessage(COLOR_LIGHTRED, string);
Log("logs/csr.log", string);
format(STRING, "Admin %s has taken your hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
}
else
{
PlayerInfo[giveplayerid][pSawnoffSkill] = 1;
SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
format(STRING, "AdmCmd: %s has given %s hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
SendAdminMessage(COLOR_LIGHTRED, string);
Log("logs/csr.log", string);
format(STRING, "Admin %s has given you hitman skill on the Sawnoff Shotgun",GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
}
}
if(strcmp(choice, "uzi", true) == 0)
{
if(PlayerInfo[giveplayerid][pUziSkill] == 1)
{
PlayerInfo[giveplayerid][pUziSkill] = 0;
SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_MICRO_UZI, 400);
format(STRING, "AdmCmd: %s has taken %s's hitman skill on the UZI",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
SendAdminMessage(COLOR_LIGHTRED, string);
Log("logs/csr.log", string);
format(STRING, "Admin %s has taken your hitman skill on the UZI",GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
}
else
{
PlayerInfo[giveplayerid][pUziSkill] = 1;
SetPlayerSkillLevel(giveplayerid, WEAPONSKILL_MICRO_UZI, 999);
format(STRING, "AdmCmd: %s has given %s hitman skill on the UZI",GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
SendAdminMessage(COLOR_LIGHTRED, string);
Log("logs/csr.log", string);
format(STRING, "Admin %s has given you hitman skill on the UZI",GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
}
}
OnPlayerStatsUpdate(giveplayerid);
return 1;
}
for(new i; i <= 10; i++) SetPlayerSkillLevel(playerid, i, 0); //According to samp wiki from 0 to 10 all the skills
If I understand, You want to reset all the weapon skills for the player then set the one chosen in the command..
If that you can use a loop like this whenever the command is used: PHP код:
Or better is to save the last chosen skill on that player and only reset it without resetting the rest >> [This is more effective] |
take it
PHP код:
|
CMD:sethitman( playerid, params[] ) { new targetID, targetName[MAX_PLAYER_NAME], adminName[MAX_PLAYER_NAME], weaponChoice[16], adminMessage[128], playerMessage[128], weaponSkillsGiven = 0 ; //Checks if ( PlayerInfo[playerid][pAdmin] <= 1339 && PlayerInfo[playerid][pShopTech] == 0 ) return Error( playerid, "You are not authorized to use this command." ); if ( sscanf( params, "is[16]", targetID, weaponChoice ) ) { SendClientMessage( playerid, COLOR_GRAD1, "USAGE: /sethitman [playerid] [weapon]" ); SendClientMessage( playerid, COLOR_GRAD2, "Available Weapons: 9mm, sawnoff, uzi" ); return 1; } //Weapon Choices if ( strcmp( weaponChoice, "9mm", true ) == 0 ) { PlayerInfo[targetID][p9mmSkill] = 0; SetPlayerSkillLevel( targetID, WEAPONSKILL_PISTOL, 400 ); } else { PlayerInfo[playerid][p9mmSkill] = 1; SetPlayerSkillLevel( targetID, WEAPONSKILL_PISTOL, 999 ); weaponSkillsGiven = 1; } if ( strcmp( weaponChoice, "sawnoff", true ) == 0 ) { PlayerInfo[targetID][pSawnoffSkill] = 0; SetPlayerSkillLevel( targetID, WEAPONSKILL_SAWNOFF_SHOTGUN, 400 ); } else { PlayerInfo[playerid][pSawnoffSkill] = 1; SetPlayerSkillLevel( targetID, WEAPONSKILL_SAWNOFF_SHOTGUN, 999 ); weaponSkillsGiven = 1; } if ( strcmp( weaponChoice, "uzi", true ) == 0 ) { PlayerInfo[targetID][pUziSkill] = 0; SetPlayerSkillLevel( targetID, WEAPONSKILL_MICRO_UZI, 400 ); } else { PlayerInfo[playerid][pUziSkill] = 1; SetPlayerSkillLevel( targetID, WEAPONSKILL_MICRO_UZI, 999 ); weaponSkillsGiven = 1; } //Messages if ( weaponSkillsGiven == 0 ) { format( adminMessage, sizeof( adminMessage ), "AdmCmd: %s has taken %s's hitman skill on the %s.", adminName, targetName, weaponChoice ); format( playerMessage, sizeof( playerMessage ), "Admin %s has taken your hitman skill on the %s.", adminName, weaponChoice ); } else { format( adminMessage, sizeof( adminMessage ), "AdmCmd: %s gave %s hitman skill on the %s.", adminName, targetName, weaponChoice ); format( playerMessage, sizeof( playerMessage ), "Admin %s has given you hitman skill on the %s.", adminName, weaponChoice ); } //Messages being Sent & Logged Log( "logs/csr.log", adminMessage ); SendAdminMessage( COLOR_LIGHTRED, adminMessage ); SendClientMessage( targetID, COLOR_WHITE, playerMessage ); OnPlayerStatsUpdate( targetID ); return 1; }