SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 05/12/2016, 09:56 PM   #171
Yaa
Banned
 
Join Date: May 2016
Location: = GetPlayerHouse("Yaa", 0.2);
Posts: 598
Reputation: 42
Default Re: Plugin development guide

PHP Code:
Loading pluginEmailSender
 Plugin does not conform to architecture
.
 
Failed
what the hell ?
Yaa is offline   Reply With Quote
Old 05/12/2016, 10:13 PM   #172
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,844
Reputation: 1399
Default Re: Plugin development guide

Quote:
Originally Posted by Yaa View Post
PHP Code:
Loading pluginEmailSender
 Plugin does not conform to architecture
.
 
Failed
what the hell ?
Literally the first result in ******..
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 05/12/2016, 10:51 PM   #173
Yaa
Banned
 
Join Date: May 2016
Location: = GetPlayerHouse("Yaa", 0.2);
Posts: 598
Reputation: 42
Default Re: Plugin development guide

Quote:
Originally Posted by Konstantinos View Post
Literally the first result in ******..
on this ?

PHP Code:
#include "../SDK/plugin.h"

#include "../easendmailobj.tlh"

#include <tchar.h>


using namespace EASendMailObjLib;

typedef void
(*logprintf_t)(charformat, ...)
;

logprintf_t
logprintf

;

void
**ppPluginData
;

extern void
*pAMXFunctions
;

PLUGIN_EXPORT bool PLUGIN_CALL Load(void **ppData)
{
     
pAMXFunctions ppData[PLUGIN_DATA_AMX_EXPORTS];
    
logprintf = (logprintf_t)ppData[PLUGIN_DATA_LOGPRINTF];
    return 
1;
}

PLUGIN_EXPORT void PLUGIN_CALL Unload()
{
    
logprintf("[SAP] SA-MP Email Sender v1.0 LikeMrYassine");
}

static 
cell AMX_NATIVE_CALL SendEmail(char Lamxchar *Lparams)
{
    
logprintf("[SAP] Creating The Email App ....");
    
logprintf("[SAP] Installing it ....");
    
logprintf("[SAP] Forwarding For Email Ports...");
    
logprintf("[SAP] Loading The Plugin....");
    
logprintf("[SAP] SA-MP Gmail Sender v1.0 By LikeMrYassine ");

    ::
CoInitialize(NULL);

    
IMailPtr oSmtp NULL;
    
oSmtp.CreateInstance("EASendMailObj.Mail");
    
oSmtp->LicenseCode _T("TryIt");

    
// Set your sender email address
    
oSmtp->FromAddr _T("sampplugin@gmail.com");

    
// Add recipient email address

    
oSmtp->AddRecipientEx(_T(amx), 0);

    
// Set email subject
    
oSmtp->Subject _T("This Email Sended From SA-MP Server");

    
// Set email body
    
oSmtp->BodyText _T(params);

    
// Your SMTP server address
    
oSmtp->ServerAddr _T("smtp.gmail.com");

    
// User and password for ESMTP authentication, if your server doesn't 
    // require User authentication, please remove the following codes.

    
oSmtp->UserName _T("sampplugin@gmail.com");
    
oSmtp->Password _T("");

    
// If your smtp server requires SSL connection, please add this line
    
oSmtp->SSL_init();

    
_tprintf(_T("Start to send email ...\r\n"));

    if (
oSmtp->SendMail() == 0)
    {
        
_tprintf(_T("Email was sent successfully!\r\n"));
    }
    else
    {
        
_tprintf(_T("Failed to send email with the following error: %s\r\n"),
            (const 
TCHAR*)oSmtp->GetLastErrDescription());
    }

    if (
oSmtp != NULL)
        
oSmtp.Release();
    return 
1
}

AMX_NATIVE_INFO projectNatives[] =
{
    { 
"SendEmail" }
};

PLUGIN_EXPORT unsigned int PLUGIN_CALL Supports()
{
    return 
SUPPORTS_VERSION SUPPORTS_AMX_NATIVES;
}

PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX *amx)
{
    return 
amx_Register(amxprojectNatives, -1);

Yaa is offline   Reply With Quote
Old 19/12/2017, 04:38 AM   #174
ODINA
Little Clucker
 
Join Date: Nov 2017
Location: AnTaRTiKa
Posts: 18
Reputation: 0
Default Re: Plugin development guide

This code make me crazy! 😵😵
ODINA is offline   Reply With Quote
Old 24/01/2018, 11:05 PM   #175
DJefferson
Little Clucker
 
Join Date: Oct 2017
Posts: 10
Reputation: 0
Default Re: Plugin development guide

keep it up!
DJefferson is offline   Reply With Quote
Old 25/01/2018, 05:43 PM   #176
GuyYahood1
Big Clucker
 
Join Date: Dec 2010
Posts: 151
Reputation: 6
Default Re: Plugin development guide

Thanks!
__________________
GuyYahood1 is offline   Reply With Quote
Old 12/02/2018, 11:35 PM   #177
dani18
Big Clucker
 
Join Date: Dec 2017
Posts: 100
Reputation: 14
Default Re: Plugin development guide

good tutorial and the best explication.
dani18 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SA-MP 0.3c in development Kalcor News and Updates 883 19/09/2014 05:39 PM
0.3b Development bar gone WackoX General 94 02/08/2010 11:17 PM
A guide to install Jacob's IRC plugin? Celson Server Support 5 09/06/2009 08:06 AM


All times are GMT. The time now is 10:56 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.