[POMOC] Dizanje para sa firme

Započeo limpo, April 02, 2013, 15:30:15 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:E.xplosion
Detaljan opis problema:Radi se o bugu u firmama,kada neko kupi firmu i kuca komandu za dizati novac iz kase /fpodigni samo izadje server:unknown command
Dio skripte: if(strcmp(cmd, "/fpodigni", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{SendClientMessage(playerid, COLOR_GRAD2, " Ne posjedujete firmu.");return 1;}

tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
if (bouse >= 100)
{
format(string, sizeof(string), "Imate $%d u vasoj kasi.", SBizzInfo[bouse-100][sbTill]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
format(string, sizeof(string), "Imate $%d u vasoj kasi.", BizzInfo[bouse][bTill]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /fpodigni [kolicina]");
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /fpodigni [kolicina]");return 1;}
if (bouse >= 100)
{
if(cashdeposit > SBizzInfo[bouse-100][sbTill] || cashdeposit < 1)
{SendClientMessage(playerid, COLOR_GRAD2, "Nemate toliko.");return 1;}
}
else
{
if (cashdeposit > BizzInfo[bouse][bTill] || cashdeposit < 1)
{SendClientMessage(playerid, COLOR_GRAD2, "Nemate toliko.");return 1;}
}

if (bouse >= 100)
{
if(!PlayerToPoint(5, playerid,SBizzInfo[bouse][sbEntranceX],SBizzInfo[bouse][sbEntranceY],SBizzInfo[bouse][sbEntranceZ]))
{SendClientMessage(playerid, COLOR_GRAD2, "Predaleko ste od vase firme!");return 1;}

else
{
SafeJBC_GivePlayerMoney(playerid,cashdeposit);
SBizzInfo[bouse-100][sbTill] -= cashdeposit;
format(string, sizeof(string), "Uzeli ste $%d iz vase kase, Ukupno: $%d", cashdeposit,SBizzInfo[bouse-100][sbTill]);
OnPropUpdate();
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
}

}
return 1;
}

Evo i za ostavljanje para:if(strcmp(cmd, "/fostavi", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{SendClientMessage(playerid, COLOR_GRAD2, " Ne posjedujete firmu.");return 1;}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
if (bouse >= 100)
{
format(string, sizeof(string), "Imate $%d u vasoj kasi.", SBizzInfo[bouse-100][sbTill]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
format(string, sizeof(string), "Imate $%d u vasoj kasi.", BizzInfo[bouse][bTill]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /fostavi [kolicina]");
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /fostavi [kolicina]");
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
{SendClientMessage(playerid, COLOR_GRAD2, "Nemate toliko.");return 1;}

if (bouse >= 100)
{
if(!PlayerToPoint(5, playerid,SBizzInfo[bouse][sbEntranceX],SBizzInfo[bouse][sbEntranceY],SBizzInfo[bouse][sbEntranceZ]))
{SendClientMessage(playerid, COLOR_GRAD2, "Predaleko ste od vase firme.");return 1;}
else
{
SafeJBC_GivePlayerMoney(playerid,-cashdeposit);
SBizzInfo[bouse-100][sbTill] += cashdeposit;
ExtortionSBiz(bouse-100, cashdeposit);
format(string, sizeof(string), "Stavili ste $%d u vasu kasu, Ukupno: $%d ", cashdeposit,SBizzInfo[bouse-100][sbTill]);
OnPropUpdate();
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
}

}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):///
Poslednja Izmena: April 02, 2013, 15:30:44 POSLE PODNE od limpo

Probaj ovako..

if(strcmp(cmd, "/fpodigni", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Ne posedujete firmu");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
if (bouse >= 100)
{
format(string, sizeof(string), "  Imate $%d u vasoj kasi.", SBizzInfo[bouse-100][sbTill]);
SendClientMessage(playerid, COLOR_GRAD3, string);
}
else
{
format(string, sizeof(string), "  Imate $%d u vasoj kasi.", BizzInfo[bouse][bTill]);
SendClientMessage(playerid, COLOR_GRAD3, string);
}
SendClientMessage(playerid, COLOR_GRAD2, "{00C0FF}Koriscenje:{FFFFFF} /fpodigni [kolicina]");
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00C0FF}Koriscenje:{FFFFFF} /fpodigni [kolicina]");
return 1;
}
if (bouse >= 100)
{
if(cashdeposit > SBizzInfo[bouse-100][sbTill] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko");
return 1;
}
}
else
{
if (cashdeposit > BizzInfo[bouse][bTill] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko");
return 1;
}
}
if (bouse >= 100)
{
if(!PlayerToPoint(100, playerid,SBizzInfo[bouse-100][sbEntranceX],SBizzInfo[bouse-100][sbEntranceY],SBizzInfo[bouse-100][sbEntranceZ]))
{
SendClientMessage(playerid, COLOR_GRAD2, "   Predaleko ste od vase firme");
return 1;
}
else
{
GivePlayerMoney(playerid,cashdeposit);
SBizzInfo[bouse-100][sbTill] -= cashdeposit;
format(string, sizeof(string), "  Uzeli ste $%d iz vase kase, Ukupno: $%d ", cashdeposit,SBizzInfo[bouse-100][sbTill]);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "[%d] %s je uzeo iz firme %d$ , a imao je",playerid, sendername, cashdeposit,SBizzInfo[bouse-100][sbTill] );
                            PayLog(string);
if(moneys >= 10000)
{
SendAdminMessage(COLOR_YELLOW,string);
}
return 1;
}
}
else
{
if (!PlayerToPoint(100, playerid,BizzInfo[bouse][bExitX],BizzInfo[bouse][bExitY],BizzInfo[bouse][bExitZ]))
{
SendClientMessage(playerid, COLOR_GRAD2, "   Predaleko ste od vaseg firme");
return 1;
}
else
{
GivePlayerMoney(playerid,cashdeposit);
BizzInfo[bouse][bTill] -= cashdeposit;
format(string, sizeof(string), "  Uzeli ste $%d iz vase kase, Ukupno: $%d ", cashdeposit,BizzInfo[bouse][bTill]);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "[%d] %s je uzeo iz firme %d$ , a imao je",playerid, sendername, cashdeposit,BizzInfo[bouse][bTill]);
                            PayLog(string);
if(moneys >= 40000)
{
SendAdminMessage(COLOR_YELLOW,string);
}
return 1;
}
}
}
return 1;
}

if(strcmp(cmd, "/fostavi", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Ne posedujete firmu");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
if (bouse >= 100)
{
format(string, sizeof(string), "  Imate $%d u vasoj kasi.", SBizzInfo[bouse-100][sbTill]);
SendClientMessage(playerid, COLOR_GRAD3, string);
}
else
{
format(string, sizeof(string), "  Imate $%d u vasoj kasi.", BizzInfo[bouse][bTill]);
SendClientMessage(playerid, COLOR_GRAD3, string);
}
SendClientMessage(playerid, COLOR_GRAD2, "{00C0FF}Koriscenje:{FFFFFF} /fostavi [kolicina]");
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00C0FF}Koriscenje:{FFFFFF} /fostavi [kolicina]");
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko");
return 1;
}
if (bouse >= 100)
{
if(!PlayerToPoint(100, playerid,SBizzInfo[bouse-100][sbEntranceX],SBizzInfo[bouse-100][sbEntranceY],SBizzInfo[bouse-100][sbEntranceZ]))
{
SendClientMessage(playerid, COLOR_GRAD2, "Predaleko ste od vase firme");
return 1;
}
else
{
GivePlayerMoney(playerid,-cashdeposit);
SBizzInfo[bouse-100][sbTill] += cashdeposit;
ExtortionSBiz(bouse-100, cashdeposit);
format(string, sizeof(string), "  Stavili ste $%d u vasu kasu, Ukupno: $%d ", cashdeposit,SBizzInfo[bouse-100][sbTill]);
SendClientMessage(playerid, COLOR_YELLOW, string);
        format(string, sizeof(string), "[%d] %s je stavio %d$ u svoju kasu",playerid, sendername, cashdeposit);
                            PayLog(string);
if(moneys >= 10000)
{
SendAdminMessage(COLOR_YELLOW,string);
}
return 1;
}
}
else
{
if (!PlayerToPoint(100, playerid,BizzInfo[bouse][bExitX],BizzInfo[bouse][bExitY],BizzInfo[bouse][bExitZ]))
{
SendClientMessage(playerid, COLOR_GRAD2, "Predaleko ste od vase firme");
return 1;
}
else
{
GivePlayerMoney(playerid,-cashdeposit);
BizzInfo[bouse][bTill] += cashdeposit;
ExtortionBiz(bouse, cashdeposit);
format(string, sizeof(string), "  Stavili ste $%d u vasu kasu, Ukupno: $%d ", cashdeposit,BizzInfo[bouse][bTill]);

SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
}
}
return 1;
}

Radi,[EG]Fa®kiaSâ,,¢ ti si moj idol xD..hvala puno RJEÅ ENO.