27.07.2012, 08:25
hello there samp community, i am having problem with this oskin cmd the problem is when someone uses it, it is giving more ammo of the weapon, i want that if the player is holding the weapon then it should not give him more ammu of that weapon. here is the code.
pawn Код:
CMD:oskin(playerid, params[])
{
if (PlayerOrg[playerid] == 0) return SendClientMessage(playerid, COLOR_RED,"You are not a member of an organization");
{
if (PlayerOrg[playerid] == 1)
{
if(GetPlayerSkin(playerid) != 108)
{
SetPlayerSkin(playerid,108);
SetPlayerColor(playerid,COLOR_YELLOW);
{
if(GetPlayerWeapon(playerid) != 5 && GetPlayerWeapon(playerid) !=32)
GivePlayerWeapon(playerid,5,1);
GivePlayerWeapon(playerid,32,350);
}
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid,COLOR_YELLOW,"You have changed to your First organization skin!");
return 1;
}
if(GetPlayerSkin(playerid) == 108)
{
SetPlayerSkin(playerid,109);
SetPlayerColor(playerid,COLOR_YELLOW);
SendClientMessage(playerid,COLOR_YELLOW,"You have changed to your second organization skin!");
SetPlayerArmour(playerid, 100);
{
if(GetPlayerWeapon(playerid) != 5 && GetPlayerWeapon(playerid) !=32)
GivePlayerWeapon(playerid,5,1);
GivePlayerWeapon(playerid,32,350);
}
return 1;
}
}
}
return 1;
}