Szerző Téma: Fegyverszekrény  (Megtekintve 3335 alkalommal)

Fegyverszekrény
« Dátum: 2011. Március 16. - 20:18:48 »
0 Show voters
Az kéne nekem, hogy megadok a fegyószekrénynek egy helyet, és ott ha beirok egy parancsot (/fegyoki) akkor kivesz nekem egy fegyvert 70% esélyben. A többi 30% az akkor van ha pl. elfogyott a fegyver.
((Nem rendszerezve simán random %-ba adja be a fegyot))
Ohh és amit nemtudok mellé kéne /me-zés. azt h lehetne megoldani?

Nem elérhető InAceX

  • 501
    • Profil megtekintése
Fegyverszekrény
« Válasz #1 Dátum: 2011. Március 16. - 20:20:26 »
0 Show voters

Fegyverszekrény
« Válasz #2 Dátum: 2011. Március 16. - 21:02:37 »
0 Show voters
ok akk már csak fegyószekrény kell:D ((köszi))
EDIT:
 
Idézetet írta: InAceX date=1300303226\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"6891\" data-ipsquote-contentclass=\"forums_Topic
A /me itt van: http://wiki.sa-mp.com/wiki/Using_strcmp()
 
Using strcmp
There is currently no text in this page, you can search for this page title in other pages or edit this page.

Nem elérhető InAceX

  • 501
    • Profil megtekintése
Fegyverszekrény
« Válasz #3 Dátum: 2011. Március 16. - 21:10:02 »
0 Show voters
Idézetet írta: Bluebay date=1300305757\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"6891\" data-ipsquote-contentclass=\"forums_Topic
ok akk már csak fegyószekrény kell:D ((köszi))
EDIT:
 

A /me itt van: http://wiki.sa-mp.com/wiki/Using_strcmp()
 
Using strcmp
There is currently no text in this page, you can search for this page title in other pages or edit this page.
 
[/quote]
Azért írja ezt mert () ez is kell a link végére.

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Fegyverszekrény
« Válasz #4 Dátum: 2011. Március 16. - 21:10:55 »
0 Show voters
Segítek  ;)
 

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, \"/me\", true, 3)) // 3 is the length of /me
    {
        if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, \"USAGE: /me [action]\");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), \"* %s %s\", str, cmdtext[4]);
        SendClientMessageToAll(0xFFFF00AA, str);
        return 1;
    }
    return 0;
}

Fegyverszekrény
« Válasz #5 Dátum: 2011. Március 16. - 22:19:55 »
0 Show voters
Ok, és akk mit irjak egy sorba? nem az kell hogy amit ö beir, hanem már egy megadott szöveget irjon ki
pl
public OnPlayerConnected
valami, valami
=
** Bluebay belépett a szerverre a közeledben.. (csak példa.)

Nem elérhető nyE

  • 1745
    • Profil megtekintése
Fegyverszekrény
« Válasz #6 Dátum: 2011. Március 17. - 13:38:53 »
0 Show voters
Erre gondoltál?
 

public OnPlayerConnect(playerid)
{
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), \"%s csatlakozott!\", str);
        SendClientMessageToAll(0xFFFF00AA, str);
        return 1;
}

Fegyverszekrény
« Válasz #7 Dátum: 2011. Március 17. - 16:35:15 »
0 Show voters
Idézetet írta: Antonyo date=1300365533\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"6891\" data-ipsquote-contentclass=\"forums_Topic
Erre gondoltál?
 

public OnPlayerConnect(playerid)
{
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), \"%s csatlakozott!\", str);
        SendClientMessageToAll(0xFFFF00AA, str);
        return 1;
}

 

Köszi, akkor /me megvan.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal