CMD:getsteel(playerid, params[]) { if(Arms[playerid] == 1) { if(IsPlayerInRangeOfPoint(playerid, 4, 245.4962, 1420.4618, 10.5604)) { if(PlayerMats[playerid][steel1] >= 1) { PlayerMats[playerid][steel1] = 1; SendClientMessage(playerid, COLOR_YELLOW, "You have now purchased some steel ignots"); SendClientMessage(playerid, COLOR_YELLOW, "Please deliver to refinery to make ignots into usable steel."); return 1; } else { SendClientMessage(playerid, COLOR_YELLOW, "You can not hold any more raw materials"); return 1; } } else { SendClientMessage(playerid, COLOR_YELLOW, "You must first go to the oil refinery to get steel package."); return 1; } } else { SendClientMessage(playerid, COLOR_YELLOW, "You must be an Arms Dealer to use that command."); } return 1; }
CMD:getsteel(playerid, params[])
{
if(Arms[playerid] == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 4, 245.4962, 1420.4618, 10.5604))
{
if (GetPlayerMoney(playerid) < 1000) // replace 1000 with your amount
{
SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough money.");
return 1;
}
if(PlayerMats[playerid][steel1] >= 1)
{
PlayerMats[playerid][steel1] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "You have now purchased some steel ignots");
SendClientMessage(playerid, COLOR_YELLOW, "Please deliver to refinery to make ignots into usable steel.");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You can not hold any more raw materials");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You must first go to the oil refinery to get steel package.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You must be an Arms Dealer to use that command.");
}
return 1;
}
pawn Код:
|
CMD:getsteel(playerid, params[]) { if(Arms[playerid] == 1) { if(IsPlayerInRangeOfPoint(playerid, 4, 245.4962, 1420.4618, 10.5604)) { if(PlayerMats[playerid][steel1] >= 1) { if(GetPlayerMoney(playerid) >= 150) { PlayerMats[playerid][steel1] = 1; SendClientMessage(playerid, COLOR_YELLOW, "You have purchased some raw steel ignot"); SendClientMessage(playerid, COLOR_YELLOW, "Take to refinery to get usable steel"); GivePlayerMoney(playerid, -150); return 1; } else { SendClientMessage(playerid, COLOR_YELLOW, "You can not afford $150"); return 1; } } else { SendClientMessage(playerid, COLOR_YELLOW, "You can not carry anymore raw materials."); return 1; } } else { SendClientMessage(playerid, COLOR_YELLOW, "You must go to the oil refinery to get steel ignot."); return 1; } } else { SendClientMessage(playerid, COLOR_YELLOW, "You must be an Arms Dealer to use that commnad."); } return 1; }