Skripta koju koristim:Cyber
Detaljan opis problema:Mogu da dizem sa ATM-a pare bilo gdje :'( nekontam u cemu je problem kod skripte ?
Dio skripte: if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1027.52441406,-946.51159668,42.25454712))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))
{
SendClientMessage(playerid, SIVA, " Niste blizu Bankomata !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu imate: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu ima te: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, CRVENA, " Nemate toliko puno Novaca !");
return 1;
}
ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Vi ste podigli $%d sa svoga racuna Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Radi sa PlayerToPoint i izbriši ovo Nisi blizu bankomata.
I ako želiš da piše "Nisi blizu bankomata" dodaj ovo na kraj
}
else
{
SendClientMessage(playerid, COLOR_RED, " Nisi blizu bankomata !");
return 1;
}
}
return 1;
}
ZnaÄi da bi ti kod ovako izgledao
if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1027.52441406,-946.51159668,42.25454712))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))
{
SendClientMessage(playerid, SIVA, " Niste blizu Bankomata !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu imate: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu ima te: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, CRVENA, " Nemate toliko puno Novaca !");
return 1;
}
ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Vi ste podigli $%d sa svoga racuna Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, " Nisi blizu bankomata !");
return 1;
}
}
return 1;
}
Citat: [M]att poslato April 11, 2011, 14:07:33 POSLE PODNE
Radi sa PlayerToPoint i izbriši ovo Nisi blizu bankomata.
I ako želiš da piše "Nisi blizu bankomata" dodaj ovo na kraj
}
else
{
SendClientMessage(playerid, COLOR_RED, " Nisi blizu bankomata !");
return 1;
}
}
return 1;
}
ZnaÄi da bi ti kod ovako izgledao sta si ovdje promjenio??
if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1027.52441406,-946.51159668,42.25454712))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606))
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))
{
SendClientMessage(playerid, SIVA, " Niste blizu Bankomata !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu imate: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu ima te: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, CRVENA, " Nemate toliko puno Novaca !");
return 1;
}
ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Vi ste podigli $%d sa svoga racuna Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, " Nisi blizu bankomata !");
return 1;
}
}
return 1;
}
EDIT:
Kad ubacim tvoju komandu dobijem ovo:
(http://www.zaslike.com/files/0tu7if2h0uxtlhrzf0u0.png)
Pogledaj kraj koda.
EDIT: ÄŒudno meni ne baca nikake warninge , sve radi.
pogledaj onaj error gore
if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsPlayerInRangeOfPoint(playerid, 3, //ovde stavi lokaciju dje zelis da moze koristit ovu komandu) && !IsPlayerInRangeOfPoint(playerid, 3, //tu drugu lokaciju itd..))
{
SendClientMessage(playerid, SIVA, " Ti nisi kod bankomata!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Korištenje: /atmwithdraw [amount]");
format(string, sizeof(string), " ImaÅ¡ $%d na raÄunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Korištenje: /atmwithdraw [amount]");
format(string, sizeof(string), " Imaš $%d na racunu.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " Nemaš toliko !");
return 1;
}
if (cashdeposit > 5000)
{
SendClientMessage(playerid, COLOR_GRAD2, " Nemožeš podignuti više od $5000!");
return 1;
}
ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Podigao si $%d sa racuna Ukupno: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
PlayerInfo[playerid][pJobTimer] = 12;
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), " ID(%d) -%s je podignuo %d sa racuna.", playerid,giveplayer,cashdeposit);
BroadCast(ZUTA,string);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /atmwithdraw ($%d)",d,m,y,h,mi,s,sendername, cashdeposit);
PayLog(string);
return 1;
}
return 1;
}
jel mogu ovako da napravim??
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106) || IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607) || IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713) || IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451) || IsPlayerInRangeOfPoint(playerid,
6.0, 1027.52441406,-946.51159668,42.25454712) || IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606) || IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))
EDIT:
daje mi error za : pJobTimer
Naravno 8)
EDIT:pod enum pInfo dodaj pJobTimer,
vidi error gore
Citat: Gangasta300 poslato April 11, 2011, 15:03:09 POSLE PODNE
jel mogu ovako da napravim??
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106) || IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607) || IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713) || IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451) || IsPlayerInRangeOfPoint(playerid,
6.0, 1027.52441406,-946.51159668,42.25454712) || IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606) || IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124))
EDIT:
daje mi error za : pJobTimer
Kakav toÄan error? Ima milijun vrsta errora/warninga napiÅ¡i koji.
Procitaj moj prijasnji post...reko sam mu stra trea...ak bude jos errora javi!
Ev iso sam test al opet isto :
(http://www.zaslike.com/files/7sp3lamm8qvrvjj07ymi.png)
Ispricavam se na cyberu mislim da treba ic ovak
if(!IsPlayerInRangeOfPoint(playerid, 3, -32.276363,-57.995586,1003.139953) && !IsPlayerInRangeOfPoint(playerid, 3, 374.718902,167.128982,1007.987304))
I sad ih tak nizas redom kolko ti treba pozicija mislim da bi ovak trebalo ic ako oces vise pozivcija
if(!IsPlayerInRangeOfPoint(playerid, 3, -32.276363,-57.995586,1003.139953) && !IsPlayerInRangeOfPoint(playerid, 3, 374.718902,167.128982,1007.987304 && !IsPlayerInRangeOfPoint(playerid, 3, 374.718902,167.128982,1007.987304)) && !IsPlayerInRangeOfPoint(playerid, 3, 374.718902,167.128982,1007.987304
EDIT:Nezz dal tocno govorim posto nisam neki pro skripter...:D...samo ako neÄ'e grijesim da me netko isparvi
dobivam errore kad stavim na taj nacin :o
if(!IsPlayerInRangeOfPoint(playerid, 3, 1034.45593262,-1024.63781738,31.74446106) && !IsPlayerInRangeOfPoint(playerid, 3, 1210.35656738,-916.02075195,42.67547607 && !IsPlayerInRangeOfPoint(playerid, 3, 1834.03784180,-1851.03039551,13.03264713)) && !IsPlayerInRangeOfPoint(playerid, 3, 1286.09313965,-1662.60424805,13.18977451)
&& !IsPlayerInRangeOfPoint(playerid, 3, 1027.52441406,-946.51159668,42.25454712 && !IsPlayerInRangeOfPoint(playerid, 3, 1307.07653809,328.18820190,19.19758606)) && !IsPlayerInRangeOfPoint(playerid, 3, 1381.05981445,259.62057495,19.20983124)
daj nam te errore omg :S
tag mismatch
if(!IsPlayerInRangeOfPoint(playerid, 3, 1034.45593262,-1024.63781738,31.74446106) && !IsPlayerInRangeOfPoint(playerid, 3, 1210.35656738,-916.02075195,42.67547607) && !IsPlayerInRangeOfPoint(playerid, 3, 1834.03784180,-1851.03039551,13.03264713) && !IsPlayerInRangeOfPoint(playerid, 3, 1286.09313965,-1662.60424805,13.18977451)
&& !IsPlayerInRangeOfPoint(playerid, 3, 1027.52441406,-946.51159668,42.25454712) && !IsPlayerInRangeOfPoint(playerid, 3, 1307.07653809,328.18820190,19.19758606) && !IsPlayerInRangeOfPoint(playerid, 3, 1381.05981445,259.62057495,19.20983124))
EDIT
kad ubacim to tovje dodje mi onaj error ko na prvoj slici sto sam ubacio! :'( :'(
EDIT: FALA CARE RIJESIO SAM :D :D
@Matt Zasto PTP kad je IsPlayerInRangeOfPoint brzi?
Evo, ovako:
if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1027.52441406,-946.51159668,42.25454712)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu imate: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu ima te: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, CRVENA, " Nemate toliko puno Novaca !");
return 1;
}
ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Vi ste podigli $%d sa svoga racuna Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
Citat: BloodMaster poslato April 11, 2011, 16:19:51 POSLE PODNE
@Matt Zasto PTP kad je IsPlayerInRangeOfPoint brzi?
Evo, ovako:
if(strcmp(cmd, "/atmwithdraw", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1034.45593262,-1024.63781738,31.74446106)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1210.35656738,-916.02075195,42.67547607)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1834.03784180,-1851.03039551,13.03264713)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1286.09313965,-1662.60424805,13.18977451)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1027.52441406,-946.51159668,42.25454712)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1307.07653809,328.18820190,19.19758606)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
if(!IsPlayerInRangeOfPoint(playerid, 6.0, 1381.05981445,259.62057495,19.20983124)) return SendClientMessage(playerid,0xff0000,"Nisi kod bankomata!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu imate: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strvalEx(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, CRVENA, "Komanda: /atmwithdraw [kolicina]");
format(string, sizeof(string), " Na Racunu ima te: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, CRVENA, " Nemate toliko puno Novaca !");
return 1;
}
ConsumingMoney[playerid] = 1;
JB_GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Vi ste podigli $%d sa svoga racuna Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, ZUTA, string);
return 1;
}
na koj god bankomat odem ispise mi da nisam kod bankomata... :DD
al radi ovo od Paul-a ;D