Szerző Téma: Score HIba  (Megtekintve 1081 alkalommal)

Nem elérhető Norby

  • 1575
    • Profil megtekintése
Score HIba
« Dátum: 2011. Május 30. - 23:39:18 »
0
Eben mi a HIba nem adja hozzá a scoert a játékba amikor beirom javitsátok PLS KÖSZII :D
[pawn]CMD:score(playerid, params[])
{
       if (IsPlayerLAdmin(playerid))
{
        new
        toplayerid,
        amount;
       if (!sscanf(params, \"ii\", toplayerid, amount))
{
       if (toplayerid != INVALID_PLAYER_ID)
   {
           new
           message[40];
           SetPlayerScore(toplayerid, amount);
           format(message, sizeof(message), \"Kaptál %d Pontot az admintól!\", amount);
           SendClientMessage(toplayerid, 0x00FF00FF, message);
   }
       else SendClientMessage(playerid, 0xFF0000FF, \"A játékos Offline\");
}
       else SendClientMessage(playerid, 0xFFFFFFFF, \"Használat: /score <playerid> <pont>\");
}
       else SendClientMessage(playerid, 0xFF0000FF, \"Csak adminok használhatják ezt a parancsot!\");
return 1;
}[/pawn]

Score HIba
« Válasz #1 Dátum: 2011. Május 31. - 19:02:50 »
0
Szerintem(én is most kezdtem az sscanf-ot használni.)
Ezt: [pawn]if (!sscanf(params, \"ii\", toplayerid, amount))[/pawn]
Írd át erre: [pawn]if (sscanf(params, \"ii\", toplayerid, amount))[/pawn]

Nem elérhető ZeRo

  • 4620
  • Ex Globális Moderátor
    • Profil megtekintése
Score HIba
« Válasz #2 Dátum: 2011. Május 31. - 19:06:24 »
0
Így annyira állítod a pontját, amennyit megadsz a parancs beírásánál. Ha hozzá akarod adni a már meglévõkhöz:
[pawn]SetPlayerScore( toplayerid, GetPlayerScore( toplayerid ) + 1 );[/pawn]

Nem elérhető Norby

  • 1575
    • Profil megtekintése
Score HIba
« Válasz #3 Dátum: 2011. Június 03. - 19:48:22 »
0
KÖSSZ KÖSSZ zárok

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal