Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
News ticker
  • Bienvenue sur le nouveau forum VeryGames
  • Welcome to the new VeryGames forum
  • VeryNews

    plugin !afk


    dume009
     Share

    Recommended Posts

    Bonjours,

     

    J'ai un petit problème pour l'un de mes plugin !afk que g trouver sur un roleplay :) il ne ce compille pas car il y a 4 erreurs.

     

    #include <sdktools>
    #include <cstrike>
    #include <smlib>
    #include <sdkhooks>
    #include <sourcemod>
    
    new bool:AfkMode[66];
    new Float:Afk_VecPos[66][3];
    new Handle:AfkTimer[66];
    
    
    public OnPluginStart()
    
    {
       RegConsoleCmd("sm_afk", Command_Afk);
    }
    
    public Action:Command_Afk(client, args)
    {
       if (IsClientConnected(client))
       {
           Afk(client);
       }
       return Action:0;
    }
    
    Afk(client)
    {
       decl String:AfkName[64];
       decl String:Name[64];
       if (!AfkMode[client][0][0]);
       {
           AfkMode[client] = 1;
           PrintToChatAll("%N est maintenant absent.", client);
           PrintToChat(client, "Vous etes maintenant absent.");
           GetClientName(client, Name, 64);
           Format(AfkName, 64, "<AFK>%s", Name);
           SetClientName(client, AfkName);
       }
       else
       {
           AfkMode[client] = 0;
           PrintToChatAll("%N n'est plus absent.", client);
           PrintToChat(client, "Vous n'etes plus absent.");
           GetClientName(client, Name, 64);
           ReplaceString(Name, 64, "<AFK>", "", true);
           SetClientName(client, Name);
       }
       return 0;
    }
    
    public Action:Afk_Timer(Handle:timer, client2)
    {
       new client = 1;
       while (client < MaxClients)
       {
           new var1;
           if (IsClientInGame(client))
           {
               decl Float:TempVec[3];
               if (GetEntPropEnt(client, PropType:0, "m_hVehicle", 0) != -1)
               {
                   GetEntPropVector(GetEntPropEnt(client, PropType:0, "m_hVehicle", 0), PropType:0, "m_vecOrigin", TempVec, 0);
               }
               else
               {
                   GetEntPropVector(client, PropType:0, "m_vecOrigin", TempVec, 0);
               }
               new var2;
               if (Afk_VecPos[client][0][0][0] == TempVec[0])
               {
                   if (AfkMode[client][0][0])
                   {
                   }
                   else
                   {
                       decl String:AfkName[64];
                       decl String:Name[64];
                       PrintToChatAll("%N est maintenant absent.", client);
                       PrintToChat(client, "Vous etes maintenant absent.");
                       AfkMode[client] = 1;
                       GetClientName(client, Name, 64);
                       Format(AfkName, 64, "<AFK>%s", Name);
                       SetClientName(client, AfkName);
                   }
               }
               if (GetEntPropEnt(client, PropType:0, "m_hVehicle", 0) != -1)
               {
                   GetEntPropVector(GetEntPropEnt(client, PropType:0, "m_hVehicle", 0), PropType:0, "m_vecOrigin", Afk_VecPos[client][0][0], 0);
                   client++;
               }
               else
               {
                   GetEntPropVector(client, PropType:0, "m_vecOrigin", Afk_VecPos[client][0][0], 0);
                   client++;
               }
               client++;
           }
           client++;
       }
       return Action:0;
    }

     

    Et pas besoin de mètre des commentaires a la c** pour dire que sa vien d'un rp ou autre :) MERCI

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

     Share

    ×
    ×
    • Create New...