[POMOC] Edit

Započeo [ED] Marac, Novembar 05, 2011, 09:53:46 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Edit NX
Detaljan opis problema: Ne radi edit
Dio skripte: CMD:edit(playerid, params[])
{
new string[128];

new idx;
    if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nisi Administrator !");
return 1;
}
new x_job[128];
x_job = strtok(params, idx);
if(!strlen(x_job)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Edit __________________|");
SendClientMessage(playerid, COLOR_WHITE, "{168BFF}INFO: {959561} /edit [ime] [ammount] (Used for Houses and Businesses)");
SendClientMessage(playerid, COLOR_GREY, "Available names: Level, Price, Funds, Products");
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
return 1;
}
temp = strtok(params, idx);
if(!strlen(temp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /edit [name] [ammount]");
return 1;
}
new proplev = strval(temp);
        //if(strcmp(x_job,"car",true) == 0)
        for(new i = 0; i < sizeof(Houses); i++)
{
if (PlayerToPoint(3, playerid,Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ]))
{
format(string, sizeof(string), "House: %d", i);
SendClientMessage(playerid, COLOR_GRAD2, string);
if(proplev > 0)
{
    if(strcmp(x_job,"level",true) == 0)
    {
Houses[i][hLevel] = proplev;
}
else if(strcmp(x_job,"price",true) == 0)
    {
Houses[i][HousePrice] = proplev;
}
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
format(string, sizeof(string), "Biz: %d", i);
SendClientMessage(playerid, COLOR_GRAD2, string);
if(proplev > 0)
{
    if(strcmp(x_job,"level",true) == 0)
    {
BizzInfo[i][bLevelNeeded] = proplev;
}
else if(strcmp(x_job,"price",true) == 0)
    {
BizzInfo[i][bBuyPrice] = proplev;
}
else if(strcmp(x_job,"funds",true) == 0)
    {
BizzInfo[i][bTill] = proplev;
}
else if(strcmp(x_job,"products",true) == 0)
    {
BizzInfo[i][bProducts] = proplev;
}
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
format(string, sizeof(string), "SBiz: %d", i);
SendClientMessage(playerid, COLOR_GRAD2, string);
if(proplev > 0)
{
    if(strcmp(x_job,"level",true) == 0)
    {
SBizzInfo[i][sbLevelNeeded] = proplev;
}
else if(strcmp(x_job,"price",true) == 0)
    {
SBizzInfo[i][sbBuyPrice] = proplev;
}
else if(strcmp(x_job,"funds",true) == 0)
    {
SBizzInfo[i][sbTill] = proplev;
}
else if(strcmp(x_job,"products",true) == 0)
    {
SBizzInfo[i][sbProducts] = proplev;
}
}
}
}
format(string, sizeof(string), "You've adjusted the: %s.", x_job);
SendClientMessage(playerid, COLOR_WHITE, string);

OnPropTextdrawUpdate();
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):