[pomoc]Komanda

Započeo Aldin Begovic
3. Apr. 2012. Zaključano
672
pregleda
4
postova
Aldin Begovic
4
Made Man
3. Apr. 2012.
mod:moj gm od 0
opis problema:Imam problema sa ovim pVarovima u ovoj komandi neznam da ih podesim lijepo pa bi molio nekog da me ispravi u ovoj komandi
cod:
COMMAND:firma(playerid, params[])
{
new string;
new x_job;
new idx;
new playername;
GetPlayerName(playerid,playername,sizeof(playername));
x_job = strtok(params, idx);
    if(GetPVarInt(playerid, "Firma") == 255)
    {
        SendClientMessage( playerid, WHITE, "*Nemas firmu" );
        return 1;
    }
if(!strlen(x_job) && GetPVarInt(playerid, "Firma") != 255 && strcmp(playername, Businesses[GetPVarInt(playerid, "Firma")], true) == 0)
{
format( string, sizeof( string ), "_______________%s______________", Businesses[GetPVarInt(playerid, "Firma")]);
SendClientMessage( playerid, 0x399CCEFF, string);
SendClientMessage(playerid, 0x7EBEDFFF,"KORISTENJE: /firma ");
SendClientMessage(playerid, 0xA4D1E8FF,"Dostupno: informacije, ostavi, izvadi, preuredi");
SendClientMessage(playerid, 0xBCDDEEFF,"Dostupno: naruci, otvori, zatvori, roba");
SendClientMessage(playerid, 0xBCDDEEFF,"_____________________________");
SendClientMessage(playerid, 0xD1E7F3FF,"Ako hoces da promijenis ime firme koristi: /imefirme ");
SendClientMessage(playerid, 0xDBECF5FF,"Ako hoces da promijenis cijene robe u svojoj firmi koristi /cijenarobe ");
return 1;
}
if(!strlen(x_job) && GetPVarInt(playerid, "Firma") != 255 &&  strcmp(playername, SBusinesses[GetPVarInt(playerid, "Firma")], true) == 0)
{
format( string, sizeof( string ), "_______________%s______________", SBusinesses[GetPVarInt(playerid, "Firma")]);
SendClientMessage( playerid, 0x399CCEFF, string);
SendClientMessage(playerid, 0x7EBEDFFF,"KORISTENJE: /firma ");
SendClientMessage(playerid, 0xA4D1E8FF,"Dostupno: informacije, ostavi, izvadi, preuredi");
SendClientMessage(playerid, 0xBCDDEEFF,"Dostupno: naruci, otvori, zatvori, roba");
SendClientMessage(playerid, 0xBCDDEEFF,"_____________________________");
SendClientMessage(playerid, 0xD1E7F3FF,"Ako hoces da promijenis ime firme koristi: /imefirme ");
SendClientMessage(playerid, 0xDBECF5FF,"Ako hoces da promijenis cijene robe u svojoj firmi koristi /cijenarobe ");
return 1;
}
if(strcmp(x_job,"otvori",true) == 0)
{
new gous;
gous=GetPVarInt(playerid, "Firma");
if( GetPVarInt(playerid, "Firma") != 255 &&  strcmp(playername, SBusinesses[GetPVarInt(playerid, "Firma")], true) == 0)
{
SendClientMessage( playerid, WHITE, "Ne mozes ovu firmu otkljucati!" );
return 1;
}
if(GetPVarInt(playerid, "Firma") != 255 && IsPlayerInRangeOfPoint( playerid, 5, Businesses, Businesses, Businesses) &&  strcmp(playername, Businesses[GetPVarInt(playerid, "Firma")], true) == 0)
{
    if(Businesses == 1)
    {
        Businesses = 0;
        SendClientMessage( playerid, WHITE, "Firma otkljucana." );
    }
else { SendClientMessage( playerid, WHITE, "Firma je vec otkljucana." ); return 1;}
}
else { SendClientMessage( playerid, WHITE, "Nisi kod ulaza firme." ); return 1;}

return 1;
}
if(strcmp(x_job,"prodaj",true) == 0)
{
#pragma unused params
new bouse = GetPVarInt(playerid, "Firma");
new souse = GetPVarInt(playerid, "Firma");
new stringt;
if( bouse != 255 &&  strcmp(playername, Businesses[GetPVarInt(playerid, "Firma")], true) == 0)
{

strmid(Businesses, "Niko", 0, strlen("Niko"), 255);
Businesses = 0;
format( stringt, sizeof( stringt ), "~y~Prodali ste firmu za: ~g~%d$", Businesses);
    SetPVarInt(playerid, "Firma", 255);
GivePlayerCash(playerid,Businesses);
Businesses = 0;
OnPropTextdrawUpdate();
SaveBusiness( bouse );

}
if( souse != 255 &&  strcmp(playername, SBusinesses[GetPVarInt(playerid, "Firma")], true) == 0 )
{

strmid(SBusinesses, "Niko", 0, strlen("Niko"), 255);
SBusinesses = 0;
format( stringt, sizeof( stringt ), "~y~Prodali ste firmu za: ~g~%d$", SBusinesses);
    SetPVarInt(playerid, "Firma", 255);
GivePlayerCash(playerid,SBusinesses);
SBusinesses = 0;
OnPropTextdrawUpdate();
SaveSBusiness( souse );

}
return 1;
}
if(strcmp(x_job,"zatvori",true) == 0)
{
new gous;
gous=GetPVarInt(playerid, "Firma");
if(GetPVarInt(playerid, "Firma") != 255 &&  strcmp(playername, SBusinesses[GetPVarInt(playerid, "Firma")], true) == 0 )
{
SendClientMessage( playerid, WHITE, "Ne mozes ovu firmu zakljucati!" );
}
if(GetPVarInt(playerid, "Firma") != 255 &&  IsPlayerInRangeOfPoint( playerid, 5, Businesses, Businesses, Businesses) &&  strcmp(playername, Businesses[GetPVarInt(playerid, "Firma")], true) == 0)
{
    if(Businesses == 0)
    {
        Businesses = 1;
        SendClientMessage( playerid, WHITE, "Firma zakljucana." );
    }
else { SendClientMessage( playerid, WHITE, "Firma je vec zakljucana." ); return 1;}
}
else { SendClientMessage( playerid, WHITE, "Nisi kod ulaza firme." ); return 1;}

return 1;
}
if(strcmp(x_job, "ostavi", true) == 0)
{

new gous;
gous=GetPVarInt(playerid, "Firma");
new souse =GetPVarInt(playerid, "Firma");
if(GetPVarInt(playerid, "Firma") != 255 && IsPlayerInRangeOfPoint( playerid, 5, Businesses, Businesses, Businesses)  &&  strcmp(playername, Businesses[GetPVarInt(playerid, "Firma")], true) == 0)
{

temp = strtok(params, idx);
if(!strlen(temp))
{
SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /firma ostavi ");
return 1;
}
    moneys = strval(temp);
    if(GetPlayerCash(playerid) < 1)
    {
        SendClientMessage(playerid, COLOR_GRAD1, " Prvo otplati dug pa dodi !");
        return 1;
}
if(GetPlayerCash(playerid) < moneys)
{
      SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko novca kod sebe !");
        return 1;
}
if(moneys > 5001 || moneys < 0)
{
      SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 5000 !");
        return 1;
}
if(GetPlayerCash(playerid) >= moneys)
{
  GivePlayerCash(playerid, -moneys);
                    Businesses[GetPVarInt(playerid, "Firma")] += moneys;
                    format( string, sizeof( string ), "Ostavio si $%d u kasu svoje firme", moneys);
                    SendClientMessage( playerid, WHITE, string);
SaveBusiness(GetPVarInt(playerid, "Firma"));
}
}
else if(GetPVarInt(playerid, "Firma") != 255 && IsPlayerInRangeOfPoint( playerid, 5, SBusinesses, SBusinesses, SBusinesses) &&  strcmp(playername, SBusinesses[GetPVarInt(playerid, "Firma")], true) == 0 )
{

temp = strtok(params, idx);
if(!strlen(temp))
{
SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /firma ostavi ");
return 1;
}
    moneys = strval(temp);
    if(GetPlayerCash(playerid) < 1)
    {
        SendClientMessage(playerid, COLOR_GRAD1, " Prvo otplati dug pa dodi !");
        return 1;
}
if(GetPlayerCash(playerid) < moneys)
{
      SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko novca kod sebe !");
        return 1;
}
if(moneys > 5001 || moneys < 0)
{
      SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 5000 !");
        return 1;
}
if(GetPlayerCash(playerid) >= moneys)
{
  GivePlayerCash(playerid, -moneys);
                    SBusinesses[GetPVarInt(playerid, "Firma")] += moneys;
                    format( string, sizeof( string ), "Ostavio si $%d u kasu svoje firme", moneys);
                    SendClientMessage( playerid, WHITE, string);
SaveSBusiness( GetPVarInt(playerid, "Firma"));
}
}
}
pHon
4
Made Man
3. Apr. 2012.
Ovo je komanda iz Noxicusa, a ne tvoja od 0 🙂
Aldin Begovic
4
Made Man
3. Apr. 2012.
♥Chuck♥ wrote on April 3, 2012, 5:01 pm:
Ovo je komanda iz Noxicusa, a ne tvoja od 0 🙂

Da ! Ali ne vidimm gdje sam to ja napisao da je moj sistem , i zamolio bi te da procitas prvo pa  tek onda napises odgovor !
Aldin Begovic
4
Made Man
4. Apr. 2012.
Jel zna neko ??

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha