[pomoc] oprema

Započeo sampzone
10. Jun 2011. Zaključano
850
pregleda
7
postova
sampzone
5
Underboss
10. Jun 2011.
mod koji ja koristim: BU

problem: napravio sam komandu kojoj clan bande dobija opremu i oduzima mu pare...ali kako da napravim kao u PD kada msm napravio sam kada kuca komandu da mu da opremu ali kako da napravim kada opet kuca komandu da mu oduzme opremu tj stavi je u ormar?

dio skripte:
evo vam komanda:
if(strcmp(cmd, "/oprema", true) == 0)
{
    if(PlayerInfo == 6 || PlayerInfo == 6)
    {
        if(PlayerToPoint(3.0,playerid,1127.1644,-2047.0270,69.0078))
        {
            SafeGivePlayerWeapon(playerid,29,50);
            SafeGivePlayerWeapon(playerid,30,50);
            SafeGivePlayerWeapon(playerid,24,30);
            SetPlayerHealth(playerid,100);
                GivePlayerMoney(playerid, -400);
                SendClientMessage(playerid,COLOR_WHITE,"Uzeli ste opremu iz ormarica! (-400 DIN)");
        }
        else
        {
        SendClientMessage(playerid,COLOR_WHITE,"Niste pored ormarica sa opremom");
}
    }
    return 1;
}


slike:/

Hvala za pomoc unaprijed!
Petar Pan
4
Made Man
10. Jun 2011.
imas tut
Mr.Lowrey
5
Godfather
10. Jun 2011.
Brat wrote on June 10, 2011, 3:19 pm:
imas tut
ti ne se*i

RemovePlayerWeapons

Ali neznam kako bi mogao kad opet kuca /oprema, samo znam za recimo /oprema [0-1]
[Bp]D.N
5
Kingpin
10. Jun 2011.

if(strcmp(cmd, "/oruzije", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo == 5 || PlayerInfo == 5)
{
if (PlayerToPoint(3, playerid,2325.0017,-1014.9199,1054.7111))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 5 || PlayerInfo == 5)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 5 || PlayerInfo == 5)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "  Niste u prostoriji sa ormaricima !");
return 1;
}
}
if(PlayerInfo == 6 || PlayerInfo == 6)
{
if (PlayerToPoint(3, playerid,1258.1849,-796.3237,1084.2344))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 6 || PlayerInfo == 6)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 6 || PlayerInfo == 6)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "  Niste u prostoriji sa ormaricima !");
return 1;
}
}
if(PlayerInfo == 8 || PlayerInfo == 8)
{
if (PlayerToPoint(3, playerid,311.6524,-169.5158,999.5938))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 8 || PlayerInfo == 8)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 8 || PlayerInfo == 8)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "  Niste u prostoriji sa ormaricima !");
return 1;
}
}
if(PlayerInfo == 12 || PlayerInfo == 12)
{
if (PlayerToPoint(3, playerid,326.6436,307.2555,999.1484))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 12 || PlayerInfo == 12)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 12 || PlayerInfo == 12)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "  Niste u prostoriji sa ormaricima !");
return 1;
}
}
  if(PlayerInfo == 15 || PlayerInfo == 15)
{
if (PlayerToPoint(3, playerid,2496.9072,-1696.7539,1014.7422))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 15 || PlayerInfo == 15)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 15 || PlayerInfo == 15)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "  Niste u prostoriji sa ormaricima !");
return 1;
}
}
  if(PlayerInfo == 16 || PlayerInfo == 16)
{
if (PlayerToPoint(3, playerid,502.1548,-78.5391,998.7578))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 16 || PlayerInfo == 16)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 16 || PlayerInfo == 166)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "  Niste u prostoriji sa ormaricima !");
return 1;
}
}
return 1;
}
}
Deleted User
Obrisan korisnik
10. Jun 2011.
Quote from June 10, 2011, 3:27 pm:

if(strcmp(cmd, "/oruzije", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo == 5 || PlayerInfo == 5)
{
if (PlayerToPoint(3, playerid,2325.0017,-1014.9199,1054.7111))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 5 || PlayerInfo == 5)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 5 || PlayerInfo == 5)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
return 1;
}
}
if(PlayerInfo == 6 || PlayerInfo == 6)
{
if (PlayerToPoint(3, playerid,1258.1849,-796.3237,1084.2344))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 6 || PlayerInfo == 6)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 6 || PlayerInfo == 6)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
return 1;
}
}
if(PlayerInfo == 8 || PlayerInfo == 8)
{
if (PlayerToPoint(3, playerid,311.6524,-169.5158,999.5938))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 8 || PlayerInfo == 8)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 8 || PlayerInfo == 8)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
return 1;
}
}
if(PlayerInfo == 12 || PlayerInfo == 12)
{
if (PlayerToPoint(3, playerid,326.6436,307.2555,999.1484))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 12 || PlayerInfo == 12)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 12 || PlayerInfo == 12)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
return 1;
}
}
  if(PlayerInfo == 15 || PlayerInfo == 15)
{
if (PlayerToPoint(3, playerid,2496.9072,-1696.7539,1014.7422))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 15 || PlayerInfo == 15)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 15 || PlayerInfo == 15)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
return 1;
}
}
  if(PlayerInfo == 16 || PlayerInfo == 16)
{
if (PlayerToPoint(3, playerid,502.1548,-78.5391,998.7578))
{
if(OnDuty==0)
        {
            if(PlayerInfo == 16 || PlayerInfo == 16)
            {
    format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeGivePlayerWeapon(playerid, 5, 70);
SetPlayerColor(playerid, 0x8D8DFF00);
OnDuty = 1;
}
else if(OnDuty==1)
{
    if(PlayerInfo == 16 || PlayerInfo == 166)
    {
format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SafeResetPlayerWeapons(playerid);
SetPlayerColor(playerid, 4294901930);
OnDuty = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
return 1;
}
}
return 1;
}
}


Da ali sa ovim mu nedaje helte i on hoce da mu uzima pare
Tako da treba da dodao i ovo
            SetPlayerHealth(playerid,100);
                GivePlayerMoney(playerid, -400);

Samo kod svakoga gde uzima tacnije gde daje oruzije e tu stavis to  😉
FlasHica
5
Kingpin
10. Jun 2011.
if(strcmp(cmd, "/oprema", true) == 0)
{
    if(PlayerInfo == 6 || PlayerInfo == 6)
    {
        if(PlayerToPoint(3.0,playerid,1127.1644,-2047.0270,69.007😎)
        {
                if(GetPVarInt(playerid, "babaVanga") == 0) {
            SafeGivePlayerWeapon(playerid,29,50);
            SafeGivePlayerWeapon(playerid,30,50);
            SafeGivePlayerWeapon(playerid,24,30);
            SetPlayerHealth(playerid,100);
                GivePlayerMoney(playerid, -400);
                SendClientMessage(playerid,COLOR_WHITE,"Uzeli ste opremu iz ormarica! (-400 DIN)");
                return SetPVarInt(playerid, "babaVanga", 1);
              }
             
                else if(GetPVarInt(playerid, "babaVanga") == 1)
                {
                ResetPlayerWeapons(playerid);
              SetPVarInt(playerid, "babaVanga", 0);
              return SendClientMessage(playerid,COLOR_WHITE,"Vratili ste opremu u ormaric!");
                }
        }
        else
        {
        SendClientMessage(playerid,COLOR_WHITE,"Niste pored ormarica sa opremom");
}
    }
    return 1;
}
sampzone
5
Underboss
11. Jun 2011.
tnx...karike rjeseno....moze lock

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha