Szerző Téma: Parancs probléma  (Megtekintve 634 alkalommal)

herban

  • Vendég
Parancs probléma
« Dátum: 2011. augusztus 08. - 10:49:00 »
0 Show voters
Üdv.
Valamiért nem akar mükõdni ez a max score beállító parancs, mert mindig 0-át ír és nem azt amit én beirok
[pawn]   if(strcmp(cmd, \"/maxkill\", true) == 0)
{
   new idx;
         new tmp[256],amount;
   tmp = strtok(cmdtext, idx);
   if(!strlen(tmp)) return SendClientMessage(playerid, red, \"USAGE: /setallcash [amount]\");
   amount = strval(tmp);
   tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, red, \"/maxkill [Amount]\");
if((amount > 1000) ){
SendClientMessage(playerid,red,\"ERROR: Incorrect Score\");  }
MAXKILLS = amount;
format(string, sizeof(string), \"Maxkill be lett állítva %d-re\", amount);
SendClientMessageToAllEx(COLOR_YELLOW, string);
return 1;
}[/pawn]

Parancs probléma
« Válasz #1 Dátum: 2011. augusztus 08. - 10:59:06 »
0 Show voters
sscanf-t használsz,csak mert avval egyszerûbb lenne?!
de itt mit szeretnél beállítani? a score-t(SetPlayerScore)?

herban

  • Vendég
Parancs probléma
« Válasz #2 Dátum: 2011. augusztus 08. - 11:16:01 »
0 Show voters
Nem, ez egy war mode és a max kill-t
sscanf-al meglehet ilyet csinálni ?

Nem elérhető kurta999

  • 2759
  • Éllő fédisznó
    • Profil megtekintése
Parancs probléma
« Válasz #3 Dátum: 2011. augusztus 08. - 11:36:13 »
0 Show voters
Legegyszerûbb megoldás:
[pawn]
CMD:maxkill(playerid, params[])
{
MAXKILLS = strval(params);
}
[/pawn]

herban

  • Vendég
Parancs probléma
« Válasz #4 Dátum: 2011. augusztus 08. - 12:21:36 »
0 Show voters
Úgy csináltam ahogy mondtad de semmi rossz az egész

Parancs probléma
« Válasz #5 Dátum: 2011. augusztus 08. - 13:10:23 »
0 Show voters
:D
Remélem az a MAXKILLS nem így néz ki:
[pawn]
#define MAXKILLS
[/pawn]
 mert akkor sokkot is kapok.  8)
Ha igen, akkor írd erre:
[pawn]
new MAXKILLS;
[/pawn]

herban

  • Vendég
Parancs probléma
« Válasz #6 Dátum: 2011. augusztus 08. - 14:11:40 »
0 Show voters
A max kill txt fájl-ba van definiálva külön.

Parancs probléma
« Válasz #7 Dátum: 2011. augusztus 08. - 20:28:40 »
0 Show voters
Idézetet írta: herban date=1312805500\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"10268\" data-ipsquote-contentclass=\"forums_Topic
A max kill txt fájl-ba van definiálva külön.
 
what?
És az hogy néz ki?

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal