Jump to content
  • 0

Random weapons....


xxSPEEDYxx

Question

Salls alls:P

cum as putea face o comanda in care cand scriu de ex:/randomw imi da 5 arme la intamplare...oricare...

eu mam gandit cum ar fii sa-l fac dar nush daca ii bine:

if (strcmp("/randomw", cmdtext, true, 10) == 0)
    {
         GivePlayerWeapon(playerid, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 ,29(random, 5));
    return 1;
}

Fara reclama in semnatura!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

[pawn]if(strcmp(cmdtext, "/randomw", true) == 0)

{

  GivePlayerWeapon(playerid, (random((46-1))+1), 99999);

  return 1;

}[/pawn]

sau

[pawn]//onplayercommandtext

if(strcmp(cmdtext, "/randomw", true) == 0)

{

    GivePlayerWeapon(playerid, randomEx(1, 46), 99999);

    return 1;

}

//undeva in script

stock randomEx(min, max) return (random((max - min)) + min); //creat de Y_Less

[/pawn]

Link to comment
Share on other sites

da dar daca pun oricare dintre scripturi care mi leai dat tu imi da numai o arma...eu as vrea sami dea 5...

Adauga de inca 4 ori randul asta:

[pawn]GivePlayerWeapon(playerid, (random((46-1))+1), 99999);[/pawn]

sau asta

[pawn]GivePlayerWeapon(playerid, randomEx(1, 46), 99999);[/pawn]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.