2 mala pitanja

Započeo Lumpri77, Jun 16, 2010, 20:50:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

evo 2 pitanjca ust 1 pitanje i 1 zamolba ;)

ajmo prvo pitanje:

kako napraviti nevidljiva auta???ako može da na klik postane nevidljivo i ponovo na klik vidiljivo a i potpuno nevidljivo bez klika...tj 2 načina jedan potppuno a jedan na klik vidljivo/nevidljivo


a sad zamolba:

ako mi ko može dat komandu za bankomat


if(strcmp(cmd, "/atmwithdraw", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(!PlayerToPoint(3, playerid, 695.4289,-1180.2031,15.4715) && !PlayerToPoint(3, playerid, 1210.5931,-909.8077,43.0200) && !PlayerToPoint(3, playerid, 1836.4535,-1689.1577,13.3473) && !PlayerToPoint(3, playerid, 1542.6625,-1666.5739,13.5549))
            {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi blizu bankomata !");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITI: /withdraw [kolicina]");
format(string, sizeof(string), "  Vi imate $%d na vasem Racunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITI: /withdraw [kolicina]");
format(string, sizeof(string), "  Vi imate $%d na vasem Racunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate tolko !");
return 1;
}
    ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), "  Uzeli ste $%d iz  vaseg racuna, ukupno: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
return 1;
}
    if(strcmp(cmd, "/atmdeposit", true) == 0)
{
        if(IsPlayerConnected(playerid))
        {
            if(!PlayerToPoint(3, playerid, 695.4289,-1180.2031,15.4715) && !PlayerToPoint(3, playerid, 1210.5931,-909.8077,43.0200) && !PlayerToPoint(3, playerid, 1836.4535,-1689.1577,13.3473) && !PlayerToPoint(3, playerid, 1542.6625,-1666.5739,13.5549))
            {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi blizu bankomata !");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITI: /atmdeposit [kolicina]");
format(string, sizeof(string), "  Vi imate $%d vasem Racunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTITI: /atmdeposit [kolicina]");
format(string, sizeof(string), "  Vi imate $%d na vasem Racunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "   Nemate tolko");
return 1;
}
GivePlayerMoney(playerid,-cashdeposit);
new curfunds = PlayerInfo[playerid][pAccount];
PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
SendClientMessage(playerid, COLOR_GREENISHGOLD, "|___ STANJE U BANCI ___|");
format(string, sizeof(string), "  Stari iznos: $%d", curfunds);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "  Ulozeno: $%d",cashdeposit);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "  Novi iznos: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GREEN, string);
SendClientMessage(playerid, COLOR_GREENISHGOLD, "|---------------------------------|");
return 1;
}
return 1;
}
if(strcmp(cmd, "/atmtransfer", true) == 0)
{
        if(IsPlayerConnected(playerid))
        {
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_GRAD1, "  Morate biti level 3 !");
return 1;
}
            if(!PlayerToPoint(3, playerid, 695.4289,-1180.2031,15.4715) && !PlayerToPoint(3, playerid, 1210.5931,-909.8077,43.0200) && !PlayerToPoint(3, playerid, 1836.4535,-1689.1577,13.3473) && !PlayerToPoint(3, playerid, 1542.6625,-1666.5739,13.5549))
            {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi blizu bankomata !");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "KORISTITI: /atmtransfer [playerid/dio imena] [kolicina]");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "KORISTITI: /atmtransfer [playerid/dio imena] [kolicina]");
return 1;
}
moneys = strval(tmp);
if (IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney = PlayerInfo[playerid][pAccount] ;
if (moneys > 0 && playermoney >= moneys)
{
PlayerInfo[playerid][pAccount] -= moneys;
PlayerInfo[giveplayerid][pAccount] += moneys;
format(string, sizeof(string), "   Vi ste poslali $%d na %s-ov račun", moneys, giveplayer,giveplayerid);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), "   Vi ste dobili $%d na racun od %s", moneys, sendername, playerid);
SendClientMessage(giveplayerid, COLOR_GRAD1, string);
format(string, sizeof(string), "%s je poslao $%d %s-u", sendername, moneys, giveplayer);
                if(moneys >= 500000)
{
ABroadCast(COLOR_YELLOW,string,1);
}
printf("%s", string);
PayLog(string);
PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Neispravan iznos transakcije");
}
}
}
else
{
format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}

Upotrijebi moje primjere:



if (strcmp("/invisible", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
                    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 100);
SendClientMessage(playerid, COLOR_YELLOW, "Vozilo vam je sad nevidljivo");
                    GivePlayerMoney(playerid, -3500);
                    PlayerPlaySound(playerid,1133,0.0,0.0,0.0);
                   
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Niste u vozilu!");
return 1;
}
}
if (strcmp("/visible", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(playerid));
        SendClientMessage(playerid, COLOR_YELLOW, "Vozilo vidljivo");
        PlayerPlaySound(playerid,1138,0.0,0.0,0.0);
return 1;
}
}
Aequam memento rebus in arduis servare mentem.