jlalt

46484

Nov 19th, 2015
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.98 KB | None | 0 0
  1. public OnTagDataLoad(playerid)
  2. {
  3.     PlayerInfo[playerid][Tag] = 1;
  4.     return 1;
  5. }
  6.  
  7.  
  8. public OnPlayerConnect(playerid)
  9. {
  10.     if(strfind(GetName(playerid), "[AwC]") != -1 || strfind(GetName(playerid), "[AwC]") != -1)
  11.     {
  12.         new query[256];
  13.         mysql_format(database, query, sizeof(query), "SELECT * FROM Tag WHERE Nick = '%s' AND Allowed= '1' LIMIT 1", GetName(playerid));
  14.         mysql_tquery(database,query,"OnTagDataLoad","i",playerid);
  15.         new rows,fields;
  16.         cache_get_data(rows,fields,database);
  17.         if(rows)
  18.         {
  19.             PlayerInfo[playerid][Tag] = 1;
  20.         }
  21.         else
  22.         {
  23.             SendClientMessage(playerid, red, "You are not an official [AwC] Tag Holder, you cannot login with the [AwC] Tag");
  24.             SendClientMessage(playerid, red, "Please logout and login with a different name that does not consist of the [AwC] Tag");
  25.             SetTimerEx("KickPublic", 200, false, "i", playerid);
  26.         }
  27.         return 1;
  28.     }
  29.     return 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment