Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Otisao s Foruma! poslato Februar 23, 2012, 16:57:06 POSLE PODNE

Naslov: [Pomoc] lotto.kupovanje,.
Poruka od: Otisao s Foruma! poslato Februar 23, 2012, 16:57:06 POSLE PODNE
Skripta koju koristim: FG
Detaljan opis problema: e ovako izmapo sam jedno mjesto da se kupuje loto i kako sada da napravim da se tu kupuje,da se nemoze nigdje druge nego tu..?
AddPlayerClass(103,1295.7531,-1368.2665,13.6093,358.2464,0,0,0,0,0,0); //  kordinate za lotto..
Dio skripte:if(strcmp(cmd, "/lotto", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pLottoNr] > 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Vec imate listic za lotto !");
            return 1;
        }
        if(GetPlayerMoney(playerid) < 50)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Treba vam $50 za lotto listic !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE,"Koriscenje: /lotto [number]");
return 1;
}
new lottonr = strval(tmp);
if(lottonr < 1 || lottonr > 80) { SendClientMessage(playerid, COLOR_GREY, "   Lotto broj moze biti od 1 do 80 !"); return 1; }
format(string, sizeof(string), "* Kupili ste listic za lotto sa brojem: %d.", lottonr);
SendClientMessage(playerid, COLOR_WHITE, string);
SafeGivePlayerMoney(playerid, - 50);
PlayerInfo[playerid][pLottoNr] = lottonr;
    }
    return 1;
}
Naslov: Odg: [Pomoc] lotto.kupovanje,.
Poruka od: vlado_plavsic poslato Februar 23, 2012, 19:15:51 POSLE PODNE
if(strcmp(cmd, "/lotto", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pLottoNr] > 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Vec imate listic za lotto !");
            return 1;
        }
        if(!if(IsPlayerInRangeOfPoint(playerid, 10.0, 1295.7531,-1368.2665,13.6093)))
        {
            SendClientMessage(playerid, COLOR_GREY, "Niste ispred trafike !!");
            return 1;
        }
        if(GetPlayerMoney(playerid) < 50)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Treba vam $50 za lotto listic !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE,"Koriscenje: /lotto [number]");
return 1;
}
new lottonr = strval(tmp);
if(lottonr < 1 || lottonr > 80) { SendClientMessage(playerid, COLOR_GREY, "   Lotto broj moze biti od 1 do 80 !"); return 1; }
format(string, sizeof(string), "* Kupili ste listic za lotto sa brojem: %d.", lottonr);
SendClientMessage(playerid, COLOR_WHITE, string);
SafeGivePlayerMoney(playerid, - 50);
PlayerInfo[playerid][pLottoNr] = lottonr;
    }
    return 1;
}
Naslov: Odg: [Pomoc] lotto.kupovanje,.
Poruka od: Otisao s Foruma! poslato Februar 23, 2012, 20:51:37 POSLE PODNE
Hvala moze lock!  ;)