Jump to content

LaZ

V.I.P
  • Posts

    531
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by LaZ

  1. Am primit PM de la el spunand ca nu merge sa seteze peste 100, cred ca ii mai corect sa se foloseasca floatstr in loc de float.

    Am facut o comanda, folosind floatstr am reusit sa setez viata peste 100.

    http://pastebin.com/796HzSWU - Script folosit

    http://img824.imageshack.us/img824/8169/samp447.png - Screenshot

  2. LaZ" post="36820" timestamp="1280491936"]

    new Text: text22;
    
    public OnGameModeInit( )
    {
        TextDrawCreate( text22, ..., ..., "..." );
    }
    
    public OnPlayerCommandText( playerid, cmdtext[] )
    {
        if ( strcmp( cmdtext, "/show", true, 5 ) == 0 )
        {
             TextDrawShowForPlayer( playerid, text22 );
             SendClientMessage( playerid, -1, "Foloseste RMB ca sa ascunzi textdraw-ul" );
             return true;
        }
    }
    
    public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
    {
        if ( newkeys & KEY_AIM ) && !( oldkeys & KEY_AIM ) )
        {
            TextDrawHideForPlayer( playerid, text22 );
            SendClientMessage( playerid, -1, "Ai dat click dreapta si ai ascuns textdraw-ul" );
        }
        return false; // sau return true; daca chemi callback-ul din alte filterscripturi, presupun ca codul merge in gamemode
    }
    

  3. Viata unui jucator ii o valoare de tip FLOAT, adica variabila 'health' trebuie sa fie FLOAT, nu INTEGER cum ii in acel exemplu. Ca sa transformi acel integer in float, va trebui sa inlocuiesti linia SetPlayerHealth( playa, health ); cu SetPlayerHealth( playa, float( health ) );

    float( integer ) transforma integer-ul dat intr-o valoare tip float.

  4. new Text: text22;
    
    public OnGameModeInit( )
    {
        TextDrawCreate( text22, ..., ..., "..." );
    }
    
    public OnPlayerCommandText( playerid, cmdtext[] )
    {
        if ( strcmp( cmdtext, "/show", true, 5 ) == 0 )
        {
             TextDrawShowForPlayer( playerid, text22 );
             SetTimerEx( "HideDraw", (1000 * 10), false, "i", playerid );
             SendClientMessage( playerid, -1, "TextDraw-ul se va ascunde in 10 secunde..." );
             return true;
        }
    }
    
    forward HideDraw( playerid );
    public HideDraw( playerid )
    {
        TextDrawHideForPlayer( playerid, text22 );
        ...
        return true;
    }
    

  5. 1  if (strcmp("/status", cmdtext, true, 10) == 0)
    2  {
    3        new tmp[256], idx;
    4        tmp = strtok(cmdtext, idx);
    5        Update3DTextLabelText(status[playerid], 0x008080FF, sizeof(tmp));
    6        Attach3DTextLabelToPlayer(status[playerid], playerid, 0.0, 0.0, 0.7);
    7        return 1;
    8  }
    

  6. public OnPlayerRequestClass(playerid,classid)
    {
        {
            SendClientMessage(playerid,COLOR_GREEN,"Cand vei apasa shift sau spawn vei primi kick");
        }
        SendClientMessage(playerid, 0x33AAFFFF, str);
        return 1;
    }
    public OnPlayerRequestSpawn(playerid)
    {
    	kick(playerid);
        SendClientMessage(playerid,COLOR_GREEN,"Nu ai voie sa iti schimbi skin-ul pe acest gm");
        return 1;
    }

    daca se intampla cumva sa nu vreti ca cineva sa isi schimbe skinul adaugati asta:))

    Te simti bine ?

×
×
  • 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.