Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <a_http>
- #define WBB4_URL "url/info.php"
- forward HTTP_WBB4_CREATE(index, response_code, data[]);
- stock WBB4_CREATE(playerid, Name[], DBID, EMail[], pass[])
- {
- new string[450];
- format(string,sizeof(string),""#WBB4_URL"?funktion=create&sampdbid=%d&sampname=%s&email=%s&pw=%s",DBID,Name,EMail,pass);
- HTTP(playerid, HTTP_GET, string, "", "HTTP_WBB4_CREATE");
- return 1;
- }
- stock WBB4_UPDATERECHTE(playerid)
- {
- if(sInfo[playerid][sEingeloggt] == 1)
- {
- if(strcmp(sInfo[playerid][sWBBID],"-1",true))
- {
- new string[450];
- format(string,sizeof(string),""#WBB4_URL"?funktion=update&sampdbid=%d&sampname=%s",sInfo[playerid][sDBID],sInfo[playerid][sName]);
- HTTP(playerid, HTTP_GET, string, "", "");
- }
- }
- return 1;
- }
- stock WBB4_BANUSER(playerid, banid, grund[])
- {
- if(sInfo[playerid][sEingeloggt] == 1)
- {
- if(strcmp(sInfo[playerid][sWBBID],"-1",true))
- {
- new string[450],name[65];
- if(banid == -1)
- {
- format(name,sizeof(name),"System");
- }
- else
- {
- format(name,sizeof(name),"%s",sInfo[banid][sName]);
- }
- format(string,sizeof(string),""#WBB4_URL"?funktion=banuser&sampdbid=%d&sampname=%s&reason=%s&banname=%s",sInfo[playerid][sDBID],sInfo[playerid][sName],grund,name);
- HTTP(playerid, HTTP_GET, string, "", "");
- }
- }
- return 1;
- }
- public HTTP_WBB4_CREATE(index, response_code, data[])
- {
- if(response_code == 200)
- {
- new query[265];
- format(query,sizeof(query),"UPDATE accounts SET WBBID='%s' WHERE ID='%d'",data,sInfo[index][sDBID]);
- mysql_query(query);
- mysql_free_result();
- LoadAccount(index);
- SendStartBonusEmail(index);
- SpawnPlayer(index);
- }
- else
- {
- FehlerMeldung(index,"Dein Forumaccount konnte nicht erstellt werden");
- LoadAccount(index);
- SpawnPlayer(index);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement