'Opet' ne daje score

Započeo Plen Ki Mun
21. Mar. 2018. Zaključano
588
pregleda
11
postova
Mate
5
Underboss
21. Mar. 2018.
Problem(error/warning): Komanda ne daje igracu score to je ne postavlja na zadani broj, ništa se ne događa. @Ino42O

Dio skripte
:
CMD:setscore(playerid, params[])
{
new string, pName, name, pID, score;

if (PInfo < 5) return SCM(playerid, -1"Nemozes to.");
if(sscanf(params, "ud", pID, score)) return SCM(playerid, -1,": {FFFFFF}/setscore ");
if(pID == INVALID_PLAYER_ID) return SCM(playerid, RED, "Igrac nije povezan");
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(pID, pName, sizeof(pName));
format(string, sizeof(string), ": {FFFFFF}%s ti je postavi score na %d name, score);
SCM(pID, COLOR_ADMIN, string);
format(string, sizeof(string), ": {FFFFFF}Postavio si %d score za %s", score, pName);
SCM(playerid, COLOR_ADMIN, string);

SetPlayerScore(pID, score);
return 1;
}


I ovdje ne daje igracu skor.
GivePlayerScore(captureZone, GetPlayerScore(captureZone) + 2);


Kasnije sam dodao ovaj štok, ali nezz ima li potrebe za time
stock GivePlayerScore(playerid, score)
{
SetPlayerScore(playerid, GetPlayerScore(playerid)+score);
return 1;
}


Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Slika/video ingame problema(obavezno ako je ingame problem):
ophion
5
OG Legend
21. Mar. 2018.
uradi debug
Bolex_
4
Made Man
21. Mar. 2018.
Pokušaj ovo.

CMD:setscore(playerid, params[])
{
new targetid, amount, string;

if (PInfo < 5)
return SCM(playerid, -1, "Nemas dopustenje.");

if (sscanf(params, "ud", targetid, amount))
return SCM(playerid, -1, "/setscore ID Name");

if (targetid == INVALID_PLAYER_ID)
return SCM(playerid, -1, "ID igraca je nepostojeci.");

format(string,sizeof(string),"Postavili ste %s's score na %d.", PInfo[targetid, amount);
SCM(targetid, -1, string);

format(string,sizeof(string),"%s vam je postavio score na %d.", PInfo, amount);
SCM(playerid, -1, string);

SetPlayerScore(playerid, amount);
return 1;
}
Belegija
4
Enforcer
21. Mar. 2018.
Nadji kako ti je definisan Score broj i kucas posle cmd SetPlayerScore(PlayerInfo == %d,GetScore(ili definicija scora)

Eto,mozda bi trebalo da radi
Mate
5
Underboss
21. Mar. 2018.
Bolex_ wrote on March 21, 2018, 2:32 pm:
Pokušaj ovo.

CMD:setscore(playerid, params[])
{
new targetid, amount, string;

if (PInfo < 5)
return SCM(playerid, -1, "Nemas dopustenje.");

if (sscanf(params, "ud", targetid, amount))
return SCM(playerid, -1, "/setscore ID Name");

if (targetid == INVALID_PLAYER_ID)
return SCM(playerid, -1, "ID igraca je nepostojeci.");

format(string,sizeof(string),"Postavili ste %s's score na %d.", PInfo[targetid, amount);
SCM(targetid, -1, string);

format(string,sizeof(string),"%s vam je postavio score na %d.", PInfo, amount);
SCM(playerid, -1, string);

SetPlayerScore(playerid, amount);
return 1;
}


Hvala tbr.

Radi sada kako treba. <3
Taylor Script
4
Made Man
21. Mar. 2018.
Bolex_ wrote on March 21, 2018, 2:32 pm:
Pokušaj ovo.

CMD:setscore(playerid, params[])
{
new targetid, amount, string;

if (PInfo < 5)
return SCM(playerid, -1, "Nemas dopustenje.");

if (sscanf(params, "ud", targetid, amount))
return SCM(playerid, -1, "/setscore ID Name");

if (targetid == INVALID_PLAYER_ID)
return SCM(playerid, -1, "ID igraca je nepostojeci.");

format(string,sizeof(string),"Postavili ste %s's score na %d.", PInfo[targetid, amount);
SCM(targetid, -1, string);

format(string,sizeof(string),"%s vam je postavio score na %d.", PInfo, amount);
SCM(playerid, -1, string);

SetPlayerScore(playerid, amount);
return 1;
}
Imas tu mali milion gresaka!
Ivan_Ino
5
Kingpin
21. Mar. 2018.
SetPlayerScore(playerid, amount);

u

SetPlayerScore(targetid, amount);

?
Bolex_
4
Made Man
21. Mar. 2018.
Komanda se koristi već godinama na server u mome signature, znao bih da ima problema  😉
Freddyâ„¢
4
Made Man
21. Mar. 2018.
Ino42O wrote on March 21, 2018, 4:41 pm:
SetPlayerScore(playerid, amount);

u

SetPlayerScore(targetid, amount);

?


Da ovo mora biti targetid inace ce setati igracu koji kuca komandu a ne zeljenom IDu.
Mate
5
Underboss
21. Mar. 2018.
Testao sam komandu sa prijateljem ovo što je tbr bolex dao i radi mi okej.

Moze lock tu.  🙂
ophion
5
OG Legend
21. Mar. 2018.
cudna mi je ta komanda od bolexa lmao, al hj

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha