15:54
ОбновитьСмайлыУправление мини-чатом
МИНИ-ЧАТ
Главная страница!

 



 
          





Рекомендуем:





Последние Файлы GTA 4 Последние Файлы GTA-MP Реклама
Скрипт GTA 4 элементы Watch... 07.09.2014
Ferrari 360 Spider [EPM con... 13.12.2013
Porsche Cayenne Turbo 2012 ... 13.12.2013
Shelby Terlingua Mustang v1... 13.12.2013
Hamann Lamborghini Gallardo... 27.10.2013
[GM] The Big PEN1:LS v2.00 ... 04.12.2017
Dgun (AvnanceRP,SampRP,Dimo... 19.03.2016
SAMP скрипт SX Events (MySQ... 03.03.2016
Карта ASL мэрия для SAMP се... 03.03.2016
AIM для SA-MP 0.3.7 22.02.2016
Модератор форума: AXE, Weddew  
[Архив #1] Вопросы по SAMP скриптам
PHPДата: Пятница, 18.04.2008, 22:44 | Сообщение # 1
Советчик
Группа: Пользователи
Сообщений: 1246
Награды: 71
Город: 1164
Замечания: 0%
Статус:
Задавайте вопросы, попробуем помочь!


Сообщение отредактировал Weddew - Понедельник, 09.06.2014, 03:17
flyawayДата: Пятница, 18.11.2011, 07:38 | Сообщение # 3121
Новенький
Группа: Пользователи
Сообщений: 4
Награды: 0
Город: междуреченск
Репутация: 0
Замечания: 0%
Статус:
помогите пожалуйста,скажите как убрать ворота с сервера
AxeleratorДата: Пятница, 18.11.2011, 11:50 | Сообщение # 3122
Уверенный в себе
Группа: I'm V.I.P.
Сообщений: 237
Награды: 2
Город: Омск
Репутация: 159
Замечания: 40%
Статус:
Quote (flyaway)
помогите пожалуйста,скажите как убрать ворота с сервера

DestroyObject(objectid);

KirjaДата: Суббота, 26.11.2011, 00:06 | Сообщение # 3123
Новенький
Группа: Продвинутые
Сообщений: 35
Награды: 1
Город: Tallinn
Репутация: 5
Замечания: 0%
Статус:
Вопрос связанный с mysql:
Может кто нибудь написать пример кода, как заставить павно прочитать столбик с текстом из базы данных, и вставить этот текст в ник игрока(сменить ник тупо говоря)?
У меня ник который в сампе прописывается, работает как логин, а ник на сервере хранится в столбике с аккаунтом.
Заранее спасибо! ...up

Добавлено (25.11.2011, 21:03)
---------------------------------------------
кто нибудь ответит? :) если нужно более подробное описание того, что требуется, могу в скайпе или асе подробнее описать.

Добавлено (26.11.2011, 00:06)
---------------------------------------------
все, уже не надо, сам разобрался и все работает. :)


Сообщение отредактировал Kirja - Среда, 23.11.2011, 17:09
emosoeДата: Воскресенье, 27.11.2011, 11:36 | Сообщение # 3124
Новенький
Группа: Пользователи
Сообщений: 20
Награды: 0
Город: Реальных Пацанов:@
Репутация: 0
Замечания: 0%
Статус:
Выручайте добавил в регу админку, а при перезаходе постоянно Admin=0
Code
#include <a_samp>
#include <ini>

#define DIALOG_LOGIN 998  
#define DIALOG_REGISTER 999  
#define AccauntBD "users/%s.ini"

#define COLOR_ORANGE 0xFF8000AA  
#define COLOR_RED 0xFF0000AA

forward OnPlayerRegistered(playerid, password[]);
forward OnPlayerLogged(playerid, password[]);
forward OnPlayerSave(playerid);
forward ShowPlayerRegisterDialog(playerid);
forward ShowPlayerLoginDialog(playerid);

enum pInfo
{
  pMoney,
  pScore,
  pAdmin
};

new PlayerInfo[MAX_PLAYERS][pInfo];

public OnPlayerConnect(playerid)
{
  new string[128];
  PlayerInfo[playerid][pMoney] = 0;
  PlayerInfo[playerid][pScore] = 0;
     PlayerInfo[playerid][pAdmin] = 0;
      
     format(string,sizeof(string),AccauntBD,PlayerName(playerid));
     if(fexist(string))
  {
         ShowPlayerLoginDialog(playerid);
  else
  {
    ShowPlayerRegisterDialog(playerid);
  return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
  OnPlayerSave(playerid);
  return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
     if(dialogid == DIALOG_LOGIN)
     {
         if(!response) Kick(playerid);
         if(strlen(inputtext) == 0) return ShowPlayerLoginDialog(playerid);
         OnPlayerLogged(playerid, inputtext);
         return 1;
     }
  if(dialogid == DIALOG_REGISTER)
     {
         if(!response) Kick(playerid);
         if(strlen(inputtext) == 0) return ShowPlayerRegisterDialog(playerid);
         OnPlayerRegistered(playerid, inputtext);
         return 1;
     }
  return 0;
}

public OnPlayerLogged(playerid, password[])
{
  new string[128];
     format(string,sizeof(string),AccauntBD,PlayerName(playerid));
     new iniFile = ini_openFile(string);
     ini_getString(iniFile, "Password",string);
     if(strcmp(string,password, true, 10) == 0)
  {
         ini_getInteger(iniFile,"Money",PlayerInfo[playerid][pMoney]);
         ini_getInteger(iniFile,"Score",PlayerInfo[playerid][pScore]);
         ini_getInteger(iniFile,"Admin",PlayerInfo[playerid][pAdmin]);
         ini_closeFile(iniFile);
         GivePlayerMoney(playerid,PlayerInfo[playerid][pMoney]);
         SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
     }
  else
  {
         ShowPlayerLoginDialog(playerid);
         SendClientMessage(playerid,COLOR_RED,"Íåâåðíûé ïàðîëü. Ïîïðîáóéòå åùå ðàç");
         ini_closeFile(iniFile);
     }
     return 1;
}

public OnPlayerRegistered(playerid, password[])
{
     new IP[24],strdate[24],string[128];
     new year,month,day;
  getdate(year, month, day);
     GetPlayerIp(playerid, IP, sizeof(IP));

     format(string,sizeof(string),AccauntBD,PlayerName(playerid));
     new iniFile = ini_createFile(string);
     if(iniFile < 0)
     iniFile = ini_openFile(string);
     ini_setString(iniFile, "Password",password);
  format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
  ini_setString(iniFile, "RegDate", strdate);
  ini_setString(iniFile, "IP",IP);
   ini_setInteger(iniFile,"Money",0);
  ini_setInteger(iniFile,"Score",0);
  ini_setInteger(iniFile,"Admin",0);
     ini_closeFile(iniFile);
     OnPlayerLogged(playerid,password);
     format(string,sizeof(string), "Âû çàðåãèñòðèðîâàëèñü è àâòîìàòè÷åñêè çàëîãèíèëèñü. Âàø ïàðîëü: %s",password);
     SendClientMessage(playerid,COLOR_ORANGE,string);
     GivePlayerMoney(playerid,0);
     return 1;
}

public OnPlayerSave(playerid)
{
  new string[128];
     format(string,sizeof(string),AccauntBD,PlayerName(playerid));
     new iniFile = ini_openFile (string);
  ini_setInteger(iniFile,"Money",GetPlayerMoney(playerid));
  ini_setInteger(iniFile,"Score",GetPlayerScore(playerid));
   ini_setInteger(iniFile,"Admin",pAdmin);
     ini_closeFile(iniFile);
     return 1;
}

public ShowPlayerRegisterDialog(playerid)
{
  new string[256];
  format(string,sizeof(string), "Çäðàâñòñóéòå %s, âû íå çàðåãèñòèðîâàíû íà DriftMania!\nÂâåäèòå ïàðîëü â ïîëå íèæå. 'Îê'",PlayerName(playerid));
     ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Ðåãèñòðàöèÿ:", string, "Îê", "Âûõîä");
  return 1;
}

public ShowPlayerLoginDialog(playerid)
{
   new string[256];
  format(string,sizeof(string), "Çäðàâñòâóéòå %s âàø àêêàóíò çàðåãèñòðèðîâàí íà DriftMania!\nÂâåäèòå ïàðîëü óêàçàííûé ïðè ðåãèñòðàöèè.",PlayerName(playerid));
     ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Àâòîðèçàöèÿ:", string, "Îê", "Âûõîä");
  return 1;
}

stock PlayerName(playerid)
{
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid,name,sizeof(name));
  return name;
}



[URL=http://2ip.ru/speed/][IMG]http://2ip.ru/speedbar/KN3B5CNaiE/wm3Ir9PaC5aB2TONHKsphoOYNtriOXo/8+wPSk5F+y3yAUCM=.gif[/IMG][/URL]
zEr019Дата: Воскресенье, 27.11.2011, 12:08 | Сообщение # 3125
Уверенный в себе
Группа: Пользователи
Сообщений: 166
Награды: 13
Город: Киев
Репутация: 40
Замечания: 20%
Статус:
emosoe, пробуй так:

Code
#include <a_samp>  
  #include <ini>  

  #define DIALOG_LOGIN 998   
  #define DIALOG_REGISTER 999   
  #define AccauntBD "users/%s.ini"  

  #define COLOR_ORANGE 0xFF8000AA   
  #define COLOR_RED 0xFF0000AA  

  forward OnPlayerRegistered(playerid, password[]);  
  forward OnPlayerLogged(playerid, password[]);  
  forward OnPlayerSave(playerid);  
  forward ShowPlayerRegisterDialog(playerid);  
  forward ShowPlayerLoginDialog(playerid);  

  enum pInfo  
  {  
   pMoney,  
   pScore,  
   pAdmin  
  };  

  new PlayerInfo[MAX_PLAYERS][pInfo];  

  public OnPlayerConnect(playerid)  
  {  
   new string[128];  
   PlayerInfo[playerid][pMoney] = 0;  
   PlayerInfo[playerid][pScore] = 0;  
      PlayerInfo[playerid][pAdmin] = 1;  
        
      format(string,sizeof(string),AccauntBD,PlayerName(playerid));  
      if(fexist(string))  
   {  
          ShowPlayerLoginDialog(playerid);  
   else  
   {  
     ShowPlayerRegisterDialog(playerid);  
   return 1;  
  }  

  public OnPlayerDisconnect(playerid, reason)  
  {  
   OnPlayerSave(playerid);  
   return 1;  
  }  

  public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])  
  {  
      if(dialogid == DIALOG_LOGIN)  
      {  
          if(!response) Kick(playerid);  
          if(strlen(inputtext) == 0) return ShowPlayerLoginDialog(playerid);  
          OnPlayerLogged(playerid, inputtext);  
          return 1;  
      }  
   if(dialogid == DIALOG_REGISTER)  
      {  
          if(!response) Kick(playerid);  
          if(strlen(inputtext) == 0) return ShowPlayerRegisterDialog(playerid);  
          OnPlayerRegistered(playerid, inputtext);  
          return 1;  
      }  
   return 0;  
  }  

  public OnPlayerLogged(playerid, password[])  
  {  
   new string[128];  
      format(string,sizeof(string),AccauntBD,PlayerName(playerid));  
      new iniFile = ini_openFile(string);  
      ini_getString(iniFile, "Password",string);  
      if(strcmp(string,password, true, 10) == 0)  
   {  
          ini_getInteger(iniFile,"Money",PlayerInfo[playerid][pMoney]);  
          ini_getInteger(iniFile,"Score",PlayerInfo[playerid][pScore]);  
          ini_getInteger(iniFile,"Admin",PlayerInfo[playerid][pAdmin]);  
          ini_closeFile(iniFile);  
          GivePlayerMoney(playerid,PlayerInfo[playerid][pMoney]);  
          SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);  
      }  
   else  
   {  
          ShowPlayerLoginDialog(playerid);  
          SendClientMessage(playerid,COLOR_RED,"Íåâåðíûé ïàðîëü. Ïîïðîáóéòå åùå ðàç");  
          ini_closeFile(iniFile);  
      }  
      return 1;  
  }  

  public OnPlayerRegistered(playerid, password[])  
  {  
      new IP[24],strdate[24],string[128];  
      new year,month,day;  
   getdate(year, month, day);  
      GetPlayerIp(playerid, IP, sizeof(IP));  

      format(string,sizeof(string),AccauntBD,PlayerName(playerid));  
      new iniFile = ini_createFile(string);  
      if(iniFile < 0)  
      iniFile = ini_openFile(string);  
      ini_setString(iniFile, "Password",password);  
   format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);  
   ini_setString(iniFile, "RegDate", strdate);  
   ini_setString(iniFile, "IP",IP);  
    ini_setInteger(iniFile,"Money",0);  
   ini_setInteger(iniFile,"Score",0);  
   ini_setInteger(iniFile,"Admin",0);  
      ini_closeFile(iniFile);  
      OnPlayerLogged(playerid,password);  
      format(string,sizeof(string), "Âû çàðåãèñòðèðîâàëèñü è àâòîìàòè÷åñêè çàëîãèíèëèñü. Âàø ïàðîëü: %s",password);  
      SendClientMessage(playerid,COLOR_ORANGE,string);  
      GivePlayerMoney(playerid,0);  
      return 1;  
  }  

  public OnPlayerSave(playerid)  
  {  
   new string[128];  
      format(string,sizeof(string),AccauntBD,PlayerName(playerid));  
      new iniFile = ini_openFile (string);  
   ini_setInteger(iniFile,"Money",GetPlayerMoney(playerid));  
   ini_setInteger(iniFile,"Score",GetPlayerScore(playerid));  
    ini_setInteger(iniFile,"Admin",pAdmin);  
      ini_closeFile(iniFile);  
      return 1;  
  }  

  public ShowPlayerRegisterDialog(playerid)  
  {  
   new string[256];  
   format(string,sizeof(string), "Çäðàâñòñóéòå %s, âû íå çàðåãèñòèðîâàíû íà DriftMania!\nÂâåäèòå ïàðîëü â ïîëå íèæå. 'Îê'",PlayerName(playerid));  
      ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Ðåãèñòðàöèÿ:", string, "Îê", "Âûõîä");  
   return 1;  
  }  

  public ShowPlayerLoginDialog(playerid)  
  {  
    new string[256];  
   format(string,sizeof(string), "Çäðàâñòâóéòå %s âàø àêêàóíò çàðåãèñòðèðîâàí íà DriftMania!\nÂâåäèòå ïàðîëü óêàçàííûé ïðè ðåãèñòðàöèè.",PlayerName(playerid));  
      ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Àâòîðèçàöèÿ:", string, "Îê", "Âûõîä");  
   return 1;  
  }  

  stock PlayerName(playerid)  
  {  
   new name[MAX_PLAYER_NAME];  
   GetPlayerName(playerid,name,sizeof(name));  
   return name;  
  }



Ушел с src удачи всем!!
emosoeДата: Воскресенье, 27.11.2011, 12:47 | Сообщение # 3126
Новенький
Группа: Пользователи
Сообщений: 20
Награды: 0
Город: Реальных Пацанов:@
Репутация: 0
Замечания: 0%
Статус:
Quote (zEr019)
emosoe, пробуй так:

Code
#include <a_samp>
#include <ini>

#define DIALOG_LOGIN 998
#define DIALOG_REGISTER 999
#define AccauntBD "users/%s.ini"

#define COLOR_ORANGE 0xFF8000AA
#define COLOR_RED 0xFF0000AA

forward OnPlayerRegistered(playerid, password[]);
forward OnPlayerLogged(playerid, password[]);
forward OnPlayerSave(playerid);
forward ShowPlayerRegisterDialog(playerid);
forward ShowPlayerLoginDialog(playerid);

enum pInfo
{
pMoney,
pScore,
pAdmin
};

new PlayerInfo[MAX_PLAYERS][pInfo];

public OnPlayerConnect(playerid)
{
new string[128];
PlayerInfo[playerid][pMoney] = 0;
PlayerInfo[playerid][pScore] = 0;
PlayerInfo[playerid][pAdmin] = 1;

format(string,sizeof(string),AccauntBD,PlayerName(playerid));
if(fexist(string))
{
ShowPlayerLoginDialog(playerid);
else
{
ShowPlayerRegisterDialog(playerid);
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
OnPlayerSave(playerid);
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_LOGIN)
{
if(!response) Kick(playerid);
if(strlen(inputtext) == 0) return ShowPlayerLoginDialog(playerid);
OnPlayerLogged(playerid, inputtext);
return 1;
}
if(dialogid == DIALOG_REGISTER)
{
if(!response) Kick(playerid);
if(strlen(inputtext) == 0) return ShowPlayerRegisterDialog(playerid);
OnPlayerRegistered(playerid, inputtext);
return 1;
}
return 0;
}

public OnPlayerLogged(playerid, password[])
{
new string[128];
format(string,sizeof(string),AccauntBD,PlayerName(playerid));
new iniFile = ini_openFile(string);
ini_getString(iniFile, "Password",string);
if(strcmp(string,password, true, 10) == 0)
{
ini_getInteger(iniFile,"Money",PlayerInfo[playerid][pMoney]);
ini_getInteger(iniFile,"Score",PlayerInfo[playerid][pScore]);
ini_getInteger(iniFile,"Admin",PlayerInfo[playerid][pAdmin]);
ini_closeFile(iniFile);
GivePlayerMoney(playerid,PlayerInfo[playerid][pMoney]);
SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
}
else
{
ShowPlayerLoginDialog(playerid);
SendClientMessage(playerid,COLOR_RED,"Íåâåðíûé ïàðîëü. Ïîïðîáóéòå åùå ðàç");
ini_closeFile(iniFile);
}
return 1;
}

public OnPlayerRegistered(playerid, password[])
{
new IP[24],strdate[24],string[128];
new year,month,day;
getdate(year, month, day);
GetPlayerIp(playerid, IP, sizeof(IP));

format(string,sizeof(string),AccauntBD,PlayerName(playerid));
new iniFile = ini_createFile(string);
if(iniFile < 0)
iniFile = ini_openFile(string);
ini_setString(iniFile, "Password",password);
format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
ini_setString(iniFile, "RegDate", strdate);
ini_setString(iniFile, "IP",IP);
ini_setInteger(iniFile,"Money",0);
ini_setInteger(iniFile,"Score",0);
ini_setInteger(iniFile,"Admin",0);
ini_closeFile(iniFile);
OnPlayerLogged(playerid,password);
format(string,sizeof(string), "Âû çàðåãèñòðèðîâàëèñü è àâòîìàòè÷åñêè çàëîãèíèëèñü. Âàø ïàðîëü: %s",password);
SendClientMessage(playerid,COLOR_ORANGE,string);
GivePlayerMoney(playerid,0);
return 1;
}

public OnPlayerSave(playerid)
{
new string[128];
format(string,sizeof(string),AccauntBD,PlayerName(playerid));
new iniFile = ini_openFile (string);
ini_setInteger(iniFile,"Money",GetPlayerMoney(playerid));
ini_setInteger(iniFile,"Score",GetPlayerScore(playerid));
ini_setInteger(iniFile,"Admin",pAdmin);
ini_closeFile(iniFile);
return 1;
}

public ShowPlayerRegisterDialog(playerid)
{
new string[256];
format(string,sizeof(string), "Çäðàâñòñóéòå %s, âû íå çàðåãèñòèðîâàíû íà DriftMania!\nÂâåäèòå ïàðîëü â ïîëå íèæå. 'Îê'",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Ðåãèñòðàöèÿ:", string, "Îê", "Âûõîä");
return 1;
}

public ShowPlayerLoginDialog(playerid)
{
new string[256];
format(string,sizeof(string), "Çäðàâñòâóéòå %s âàø àêêàóíò çàðåãèñòðèðîâàí íà DriftMania!\nÂâåäèòå ïàðîëü óêàçàííûé ïðè ðåãèñòðàöèè.",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Àâòîðèçàöèÿ:", string, "Îê", "Âûõîä");
return 1;
}

stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return name;
}


Не помогло, еще варианты?



[URL=http://2ip.ru/speed/][IMG]http://2ip.ru/speedbar/KN3B5CNaiE/wm3Ir9PaC5aB2TONHKsphoOYNtriOXo/8+wPSk5F+y3yAUCM=.gif[/IMG][/URL]
zEr019Дата: Воскресенье, 27.11.2011, 13:24 | Сообщение # 3127
Уверенный в себе
Группа: Пользователи
Сообщений: 166
Награды: 13
Город: Киев
Репутация: 40
Замечания: 20%
Статус:
Code
#include <a_samp>   
   #include <ini>   

   #define DIALOG_LOGIN 998    
   #define DIALOG_REGISTER 999    
   #define AccauntBD "users/%s.ini"   

   #define COLOR_ORANGE 0xFF8000AA    
   #define COLOR_RED 0xFF0000AA   

   forward OnPlayerRegistered(playerid, password[]);   
   forward OnPlayerLogged(playerid, password[]);   
   forward OnPlayerSave(playerid);   
   forward ShowPlayerRegisterDialog(playerid);   
   forward ShowPlayerLoginDialog(playerid);   

   enum pInfo   
   {   
    pMoney,   
    pScore,   
    pAdmin   
   };   

   new PlayerInfo[MAX_PLAYERS][pInfo];   

   public OnPlayerConnect(playerid)   
   {   
    new string[128];   
    PlayerInfo[playerid][pMoney] = 0;   
    PlayerInfo[playerid][pScore] = 0;   
       PlayerInfo[playerid][pAdmin] = 0;   
          
       format(string,sizeof(string),AccauntBD,PlayerName(playerid));   
       if(fexist(string))   
    {   
           ShowPlayerLoginDialog(playerid);   
    else   
    {   
      ShowPlayerRegisterDialog(playerid);   
    return 1;   
   }   

   public OnPlayerDisconnect(playerid, reason)   
   {   
    OnPlayerSave(playerid);   
    if(PlayerInfo[playerid][pAdmin] > 0)
    return 1;   
   }   

   public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])   
   {   
       if(dialogid == DIALOG_LOGIN)   
       {   
           if(!response) Kick(playerid);   
           if(strlen(inputtext) == 0) return ShowPlayerLoginDialog(playerid);   
           OnPlayerLogged(playerid, inputtext);   
           return 1;   
       }   
    if(dialogid == DIALOG_REGISTER)   
       {   
           if(!response) Kick(playerid);   
           if(strlen(inputtext) == 0) return ShowPlayerRegisterDialog(playerid);   
           OnPlayerRegistered(playerid, inputtext);   
           return 1;   
       }   
    return 0;   
   }   

   public OnPlayerLogged(playerid, password[])   
   {   
    new string[128];   
       format(string,sizeof(string),AccauntBD,PlayerName(playerid));   
       new iniFile = ini_openFile(string);   
       ini_getString(iniFile, "Password",string);   
       if(strcmp(string,password, true, 10) == 0)   
    {   
           ini_getInteger(iniFile,"Money",PlayerInfo[playerid][pMoney]);   
           ini_getInteger(iniFile,"Score",PlayerInfo[playerid][pScore]);   
           ini_getInteger(iniFile,"Admin",PlayerInfo[playerid][pAdmin]);   
           ini_closeFile(iniFile);   
           GivePlayerMoney(playerid,PlayerInfo[playerid][pMoney]);   
           SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);   
       }   
    else   
    {   
           ShowPlayerLoginDialog(playerid);   
           SendClientMessage(playerid,COLOR_RED,"Íåâåðíûé ïàðîëü. Ïîïðîáóéòå åùå ðàç");   
           ini_closeFile(iniFile);   
       }   
       return 1;   
   }   

   public OnPlayerRegistered(playerid, password[])   
   {   
       new IP[24],strdate[24],string[128];   
       new year,month,day;   
    getdate(year, month, day);   
       GetPlayerIp(playerid, IP, sizeof(IP));   

       format(string,sizeof(string),AccauntBD,PlayerName(playerid));   
       new iniFile = ini_createFile(string);   
       if(iniFile < 0)   
       iniFile = ini_openFile(string);   
       ini_setString(iniFile, "Password",password);   
    format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);   
    ini_setString(iniFile, "RegDate", strdate);   
    ini_setString(iniFile, "IP",IP);   
     ini_setInteger(iniFile,"Money",0);   
    ini_setInteger(iniFile,"Score",0);   
    ini_setInteger(iniFile,"Admin",0);   
       ini_closeFile(iniFile);   
       OnPlayerLogged(playerid,password);   
       format(string,sizeof(string), "Âû çàðåãèñòðèðîâàëèñü è àâòîìàòè÷åñêè çàëîãèíèëèñü. Âàø ïàðîëü: %s",password);   
       SendClientMessage(playerid,COLOR_ORANGE,string);   
       GivePlayerMoney(playerid,0);   
       return 1;   
   }   

   public OnPlayerSave(playerid)   
   {   
    new string[128];   
       format(string,sizeof(string),AccauntBD,PlayerName(playerid));   
       new iniFile = ini_openFile (string);   
    ini_setInteger(iniFile,"Money",GetPlayerMoney(playerid));   
    ini_setInteger(iniFile,"Score",GetPlayerScore(playerid));   
     ini_setInteger(iniFile,"Admin",pAdmin);   
       ini_closeFile(iniFile);   
       return 1;   
   }   

   public ShowPlayerRegisterDialog(playerid)   
   {   
    new string[256];   
    format(string,sizeof(string), "Çäðàâñòñóéòå %s, âû íå çàðåãèñòèðîâàíû íà DriftMania!\nÂâåäèòå ïàðîëü â ïîëå íèæå. 'Îê'",PlayerName(playerid));   
       ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Ðåãèñòðàöèÿ:", string, "Îê", "Âûõîä");   
    return 1;   
   }   

   public ShowPlayerLoginDialog(playerid)   
   {   
     new string[256];   
    format(string,sizeof(string), "Çäðàâñòâóéòå %s âàø àêêàóíò çàðåãèñòðèðîâàí íà DriftMania!\nÂâåäèòå ïàðîëü óêàçàííûé ïðè ðåãèñòðàöèè.",PlayerName(playerid));   
       ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Àâòîðèçàöèÿ:", string, "Îê", "Âûõîä");   
    return 1;   
   }   

   stock PlayerName(playerid)   
   {   
    new name[MAX_PLAYER_NAME];   
    GetPlayerName(playerid,name,sizeof(name));   
    return name;   
   }

Добавлено (27.11.2011, 13:24)
---------------------------------------------
Или это:

Code
#include <a_samp>  
  #include <ini>  

  #define DIALOG_LOGIN 998   
  #define DIALOG_REGISTER 999   
  #define AccauntBD "users/%s.ini"  

  #define COLOR_ORANGE 0xFF8000AA   
  #define COLOR_RED 0xFF0000AA  

  forward OnPlayerRegistered(playerid, password[]);  
  forward OnPlayerLogged(playerid, password[]);  
  forward OnPlayerSave(playerid);  
  forward ShowPlayerRegisterDialog(playerid);  
  forward ShowPlayerLoginDialog(playerid);  

  enum pInfo  
  {  
   pMoney,  
   pScore,  
   pAdmin  
  };  

  new PlayerInfo[MAX_PLAYERS][pInfo];  

  public OnPlayerConnect(playerid)  
  {  
   new string[128];  
   PlayerInfo[playerid][pMoney] = 0;  
   PlayerInfo[playerid][pScore] = 0;  
      PlayerInfo[playerid][pAdmin] = 0;  
        
      format(string,sizeof(string),AccauntBD,PlayerName(playerid));  
      if(fexist(string))  
   {  
          ShowPlayerLoginDialog(playerid);  
   else  
   {  
     ShowPlayerRegisterDialog(playerid);  
   return 1;  
  }  

  public OnPlayerDisconnect(playerid, reason)  
  {  
   OnPlayerSave(playerid);  
   return 1;  
  }  

  public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])  
  {  
      if(dialogid == DIALOG_LOGIN)  
      {  
          if(!response) Kick(playerid);  
          if(strlen(inputtext) == 0) return ShowPlayerLoginDialog(playerid);  
          OnPlayerLogged(playerid, inputtext);  
          return 1;  
      }  
   if(dialogid == DIALOG_REGISTER)  
      {  
          if(!response) Kick(playerid);  
          if(strlen(inputtext) == 0) return ShowPlayerRegisterDialog(playerid);  
          OnPlayerRegistered(playerid, inputtext);  
          return 1;  
      }  
   return 0;  
  }  

  public OnPlayerLogged(playerid, password[])  
  {  
   new string[128];  
      format(string,sizeof(string),AccauntBD,PlayerName(playerid));  
      new iniFile = ini_openFile(string);  
      ini_getString(iniFile, "Password",string);  
      if(strcmp(string,password, true, 10) == 0)  
   {  
          ini_getInteger(iniFile,"Money",PlayerInfo[playerid][pMoney]);  
          ini_getInteger(iniFile,"Score",PlayerInfo[playerid][pScore]);  
          ini_getInteger(iniFile,"Admin",PlayerInfo[playerid][pAdmin]);  
          ini_closeFile(iniFile);  
          GivePlayerMoney(playerid,PlayerInfo[playerid][pMoney]);  
          SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);  
      }  
   else  
   {  
          ShowPlayerLoginDialog(playerid);  
          SendClientMessage(playerid,COLOR_RED,"Íåâåðíûé ïàðîëü. Ïîïðîáóéòå åùå ðàç");  
          ini_closeFile(iniFile);  
      }  
      return 1;  
  }  

  public OnPlayerRegistered(playerid, password[])  
  {  
      new IP[24],strdate[24],string[128];  
      new year,month,day;  
   getdate(year, month, day);  
      GetPlayerIp(playerid, IP, sizeof(IP));  

      format(string,sizeof(string),AccauntBD,PlayerName(playerid));  
      new iniFile = ini_createFile(string);  
      if(iniFile < 0)  
      iniFile = ini_openFile(string);  
      ini_setString(iniFile, "Password",password);  
   format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);  
   ini_setString(iniFile, "RegDate", strdate);  
   ini_setString(iniFile, "IP",IP);  
    ini_setInteger(iniFile,"Money",0);  
   ini_setInteger(iniFile,"Score",0);  
   ini_setInteger(iniFile,"Admin",0);  
      ini_closeFile(iniFile);  
      OnPlayerLogged(playerid,password);  
      format(string,sizeof(string), "Âû çàðåãèñòðèðîâàëèñü è àâòîìàòè÷åñêè çàëîãèíèëèñü. Âàø ïàðîëü: %s",password);  
      SendClientMessage(playerid,COLOR_ORANGE,string);  
      GivePlayerMoney(playerid,0);  
      return 1;  
  }  

  public OnPlayerSave(playerid)  
  {  
   new string[128];  
      format(string,sizeof(string),AccauntBD,PlayerName(playerid));  
      new iniFile = ini_openFile (string);  
   ini_setInteger(iniFile,"Money",GetPlayerMoney(playerid));  
   ini_setInteger(iniFile,"Score",GetPlayerScore(playerid));  
   ini_setInteger(iniFile,"Admin",PlayerInfo[playerid][pAdmin]);  
   ini_closeFile(iniFile);  
   return 1;  
   }  

  public ShowPlayerRegisterDialog(playerid)  
  {  
   new string[256];  
   format(string,sizeof(string), "Çäðàâñòñóéòå %s, âû íå çàðåãèñòèðîâàíû íà DriftMania!\nÂâåäèòå ïàðîëü â ïîëå íèæå. 'Îê'",PlayerName(playerid));  
      ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Ðåãèñòðàöèÿ:", string, "Îê", "Âûõîä");  
   return 1;  
  }  

  public ShowPlayerLoginDialog(playerid)  
  {  
    new string[256];  
   format(string,sizeof(string), "Çäðàâñòâóéòå %s âàø àêêàóíò çàðåãèñòðèðîâàí íà DriftMania!\nÂâåäèòå ïàðîëü óêàçàííûé ïðè ðåãèñòðàöèè.",PlayerName(playerid));  
      ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Àâòîðèçàöèÿ:", string, "Îê", "Âûõîä");  
   return 1;  
  }  

  stock PlayerName(playerid)  
  {  
   new name[MAX_PLAYER_NAME];  
   GetPlayerName(playerid,name,sizeof(name));  
   return name;  
  }



Ушел с src удачи всем!!
DobroeZloДата: Среда, 30.11.2011, 18:11 | Сообщение # 3128
Новенький
Группа: Пользователи
Сообщений: 8
Награды: 0
Город: Курск
Репутация: 0
Замечания: 0%
Статус:
Всем привет, проблема такая:
Любой зашедший на сервер, зарегистривавшись получает админку 5 уровня (гл.Админ), как это исправить?
Основа The GodFather
Вот часть .pwn
Code
gActivePlayers[playerid]++;
  numplayers++;
  new plname[MAX_PLAYER_NAME];
  new string[MAX_PLAYER_NAME]; /*PyxiTime[playerid] = 0;*/
  SelectChar[playerid] = 0; HidePM[playerid] = 0; PhoneOnline[playerid] = 0;
  SelectCharID[playerid] = 0; SelectCharPlace[playerid] = 0; ChosenSkin[playerid] = 0;
  GettingJob[playerid] = 0; GuardOffer[playerid] = 999; GuardPrice[playerid] = 0;
     ApprovedLawyer[playerid] = 0; CallLawyer[playerid] = 0; WantLawyer[playerid] = 0;  
  KickPlayer[playerid] = 0; CurrentMoney[playerid] = 0; UsedFind[playerid] = 0; CP[playerid] = 0; Robbed[playerid] = 0; SpawnChange[playerid] = 1;
  CarOffer[playerid] = 999; CarPrice[playerid] = 0; CarID[playerid] = 0; CarCalls[playerid] = 0;
  RobbedTime[playerid] = 0; MoneyMessage[playerid] = 0; Condom[playerid] = 0;
  STDPlayer[playerid] = 0; SexOffer[playerid] = 999; SexPrice[playerid] = 0; TranPlayer[playerid] = 999;
  RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0; TieTime[playerid] = 0;
  TalkingLive[playerid] = 255; LiveOffer[playerid] = 999; TakingLesson[playerid] = 0; AnimTime[playerid] = 0;
  RefillOffer[playerid] = 999; RefillPrice[playerid] = 0;
  DrugOffer[playerid] = 999; PlayerCuffed[playerid] = 0; PlayerCuffedTime[playerid] = 0;
  DrugPrice[playerid] = 0; RegistrationStep[playerid] = 0; OnCK[playerid] = 999; GettingCK[playerid] = 999;
  DrugGram[playerid] = 0; ConnectedToPC[playerid] = 0;  
  JailPrice[playerid] = 0; MedicTime[playerid] = 0; NeedMedicTime[playerid] = 0; MedicBill[playerid] = 0; GotHit[playerid] = 0;
  WantedPoints[playerid] = 0; GoChase[playerid] = 999; GetChased[playerid] = 999; PlacedNews[playerid] = 0;
  WantedLevel[playerid] = 0; TestFishes[playerid] = 0;
  BoxWaitTime[playerid] = 0; SchoolSpawn[playerid] = 0; ChangePos2[playerid][1] = 0;
  SafeTime[playerid] = 60; TransportDuty[playerid] = 0; PlayerTied[playerid] = 0;
  BusCallTime[playerid] = 0; TaxiCallTime[playerid] = 0; MedicCallTime[playerid] = 0; MechanicCallTime[playerid] = 0;
  FindTimePoints[playerid] = 0; FindTime[playerid] = 0; JobDuty[playerid] = 0;
  Mobile[playerid] = 255; Music[playerid] = 0; BoxOffer[playerid] = 999; PlayerBoxing[playerid] = 0;
  Spectate[playerid] = 255; PlayerDrunk[playerid] = 0; PlayerDrunkTime[playerid] = 0;
  Unspec[playerid][sLocal] = 255; FishCount[playerid] = 0; WantedTime[playerid] = 0;
  WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999; WritingLine[playerid] = 0; BringingPaper[playerid] = 0; GotPaper[playerid] = 0;
  PaperOffer[playerid] = 999; Rekl[playerid] = 1;
     gLastCar[playerid] = 0; FirstSpawn[playerid] = 0; Report[playerid] = 0;  
  gOoc[playerid] = 0; gNews[playerid] = 0; BigEar[playerid] = 0; gDice[playerid] = 0; gFam[playerid] = 0;
  gSpeedo[playerid] = 0; gGas[playerid] = 0; gLogin[playerid] = 0; gWis[playerid] = 1; //gSMS[playerid] = 1;
  gPlayerLogged[playerid] = 0; gPlayerLogTries[playerid] = 0; gPlayerAccount[playerid] = 0; gLog[playerid] = 1;
  gPlayerSpawned[playerid] = 0; PlayerKarting[playerid] = 0; PlayerInKart[playerid] = 0;
  PlayerTazeTime[playerid] = 0; PlayerStoned[playerid] = 0; /*DengiTime[playerid] = 0;*/
  StartTime[playerid] = 0; TicketOffer[playerid] = 999; TicketMoney[playerid] = 0;
  MatsHolding[playerid] = 0; TutTime[playerid] = 0;
  gPlayerMission[playerid] = 0; TaxiAccepted[playerid] = 999; BusAccepted[playerid] = 999;
  NoFuel[playerid] = 0;
  HireCar[playerid] = 299; PlayersChannel[playerid] = 999; /*narko[playerid] = 0;*/
  TransportValue[playerid] = 0; TransportMoney[playerid] = 0; TransportTime[playerid] = 0; TransportCost[playerid] = 0; TransportDriver[playerid] = 999;
  Locator[playerid] = 0; //layerOnMission[playerid] = 0; MissionCheckpoint[playerid] = 0;
  WatchingTV[playerid] = 0; PlayerPaintballing[playerid] = 0; PlayerPaintballKills[playerid] = 0;
  Fishes[playerid][pLastFish] = 0; Fishes[playerid][pFishID] = 0;
  ProposeOffer[playerid] = 999; MarryWitness[playerid] = 999; MarryWitnessOffer[playerid] = 999; MarriageCeremoney[playerid] = 0; ProposedTo[playerid] = 999; GotProposedBy[playerid] = 999; DivorceOffer[playerid] = 999;
  PlayerInfo[playerid][pLevel] = 0;
  PlayerInfo[playerid][pAdmin] = 0;
  PlayerInfo[playerid][pDonateRank] = 0;
  PlayerInfo[playerid][gPupgrade] = 0;
  PlayerInfo[playerid][pConnectTime] = 0;
  PlayerInfo[playerid][pReg] = 0;
  PlayerInfo[playerid][pSex] = 0;
  PlayerInfo[playerid][pAge] = 14;
  PlayerInfo[playerid][pOrigin] = 0;
  PlayerInfo[playerid][pExp] = 0;
  //PlayerInfo[playerid][pAccount] = 0;
  PlayerInfo[playerid][pCrimes] = 0;
  PlayerInfo[playerid][pDeaths] = 0;
  PlayerInfo[playerid][pArrested] = 0;
  PlayerInfo[playerid][pWantedDeaths] = 0;
  PlayerInfo[playerid][pPhoneBook] = 0;
  PlayerInfo[playerid][pLottoNr] = 0;
  PlayerInfo[playerid][pFishes] = 0;
  PlayerInfo[playerid][pBiggestFish] = 0;
  PlayerInfo[playerid][pJob] = 0;
  PlayerInfo[playerid][pPayCheck] = 0;
  PlayerInfo[playerid][pHeadValue] = 0;
  PlayerInfo[playerid][pJailed] = 0;
  PlayerInfo[playerid][pJailTime] = 0;
  PlayerInfo[playerid][pMats] = 0;
  PlayerInfo[playerid][pDrugs] = 0;
  PlayerInfo[playerid][pLeader] = 0;
  PlayerInfo[playerid][pMember] = 0;
  //PlayerInfo[playerid][pFMember] = 255;
  PlayerInfo[playerid][pRank] = 0;
  PlayerInfo[playerid][pChar] = 0;
  PlayerInfo[playerid][pContractTime] = 0;
  PlayerInfo[playerid][pDetSkill] = 0;
  PlayerInfo[playerid][pSexSkill] = 0;
  PlayerInfo[playerid][pBoxSkill] = 0;
  PlayerInfo[playerid][pLawSkill] = 0;
  PlayerInfo[playerid][pMechSkill] = 0;
  PlayerInfo[playerid][pJackSkill] = 0;
  PlayerInfo[playerid][pCarSkill] = 0;
  PlayerInfo[playerid][pNewsSkill] = 0;
  PlayerInfo[playerid][pDrugsSkill] = 0;
  PlayerInfo[playerid][pCookSkill] = 0;
  PlayerInfo[playerid][pFishSkill] = 0;
  PlayerInfo[playerid][pTrailSkill] = 0;
  PlayerInfo[playerid][pSHealth] = 0.0;
  PlayerInfo[playerid][pHealth] = 50.0;  
  PlayerInfo[playerid][pPos_x] = 1743.4004;
  PlayerInfo[playerid][pPos_y] = -1860.3623;
  PlayerInfo[playerid][pPos_z] = 13.5788;
  PlayerInfo[playerid][pInt] = 0;
  PlayerInfo[playerid][pLocal] = 255;
  PlayerInfo[playerid][pTeam] = 3;
  PlayerInfo[playerid][pModel] = 79;
  PlayerInfo[playerid][pPhousekey] = 255;
  PlayerInfo[playerid][pPbiskey] = 255;
  PlayerInfo[playerid][pCarLicA] = 0;
  PlayerInfo[playerid][pCarLicB] = 0;
  PlayerInfo[playerid][pCarLicC] = 0;
  PlayerInfo[playerid][pFlyLic] = 0;
  PlayerInfo[playerid][pBoatLic] = 0;
  PlayerInfo[playerid][pFishLic] = 0;
  PlayerInfo[playerid][pGunLic] = 0;
  PlayerInfo[playerid][pCarTime] = 0;
  PlayerInfo[playerid][pPayDay] = 0;
  PlayerInfo[playerid][pPayDayHad] = 0;
  PlayerInfo[playerid][pCDPlayer] = 0;
  PlayerInfo[playerid][pWins] = 0;
  PlayerInfo[playerid][pLoses] = 0;
  PlayerInfo[playerid][pAlcoholPerk] = 0;
  PlayerInfo[playerid][pDrugPerk] = 0;
  PlayerInfo[playerid][pMiserPerk] = 0;
  PlayerInfo[playerid][pPainPerk] = 0;
  PlayerInfo[playerid][pTraderPerk] = 0;
  PlayerInfo[playerid][pTut] = 0;
  //PlayerInfo[playerid][pMissionNr] = 0;
  PlayerInfo[playerid][pWarns] = 0;
  PlayerInfo[playerid][pVig] = 0;
  PlayerInfo[playerid][pMed] = 0;
  PlayerInfo[playerid][pLocked] = 0;
  PlayerInfo[playerid][pZakonp] = 0;
  PlayerInfo[playerid][pBank] = 0;
  PlayerInfo[playerid][pCard] = 0;
  PlayerInfo[playerid][pNameTime] = 0;
  PlayerInfo[playerid][pMuteTime] = 0;
  PlayerInfo[playerid][pPassnum] = 0;
  PlayerInfo[playerid][pRadio] = 0;
  PlayerInfo[playerid][pPass] = 0;
  PlayerInfo[playerid][pFuel] = 0;
  PlayerInfo[playerid][pAdjustable] = 0;
  TrashMoney[playerid] = 0;
  PlayerArmor[playerid] = 0;
  SweepCP[playerid] = 0;
  shield[playerid] = 0;
  afkto[playerid] = 2;
  SetPlayerArmour(playerid,0);
  ClearCrime(playerid);
  ClearFishes(playerid);
  ClearCooking(playerid);
  ClearGroceries(playerid);
  ClearMarriage(playerid);
  SetPlayerColor(playerid,COLOR_WHITE);
  GetPlayerName(playerid, plname, sizeof(plname));
  format(string, sizeof(string), "%s.ini", plname);


Если проблема не здесь, то говорите. Выложу то что нужно.

RonaldДата: Среда, 30.11.2011, 19:22 | Сообщение # 3129
Уверенный в себе
Группа: Пользователи
Сообщений: 274
Награды: 31
Город: Ярославль
Репутация: 258
Замечания: 0%
Статус:
Quote (DobroeZlo)
Если проблема не здесь, то говорите. Выложу то что нужно.

Естественно не здесь. OnPlayerRegister кидай.



DobroeZloДата: Среда, 30.11.2011, 19:24 | Сообщение # 3130
Новенький
Группа: Пользователи
Сообщений: 8
Награды: 0
Город: Курск
Репутация: 0
Замечания: 0%
Статус:
Держи

Code

public OnPlayerRegister(playerid, password[])
{
  if(IsPlayerConnected(playerid))
  {
    new string3[32];
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));
    format(string3, sizeof(string3), "%s.ini", playername3);
    new File: hFile = fopen(string3, io_write);
    if (hFile)
    {
        strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
        new var[32];
     format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
     format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
     format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
     format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
     format(var, 32, "UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
     format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
     format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
     format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
     format(var, 32, "Age=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
     format(var, 32, "Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
     format(var, 32, "CK=%d\n",PlayerInfo[playerid][pCK]);fwrite(hFile, var);
     format(var, 32, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
     format(var, 32, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
     format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
     format(var, 32, "Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
     format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
     format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
     format(var, 32, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
     format(var, 32, "WantedDeaths=%d\n",PlayerInfo[playerid][pWantedDeaths]);fwrite(hFile, var);
     format(var, 32, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
     format(var, 32, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
     format(var, 32, "Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
     format(var, 32, "BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
     format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
     format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
     format(var, 32, "HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
     format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
     format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
     format(var, 32, "Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
     format(var, 32, "Drugs=%d\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
     format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
     format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
     format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
     format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
     format(var, 32, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
     format(var, 32, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
     format(var, 32, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
     format(var, 32, "BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
     format(var, 32, "LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
     format(var, 32, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
     format(var, 32, "JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
     format(var, 32, "CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
     format(var, 32, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
     format(var, 32, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
     format(var, 32, "CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
     format(var, 32, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
     format(var, 32, "TrailSkill=%d\n",PlayerInfo[playerid][pTrailSkill]);fwrite(hFile, var);
     format(var, 32, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
              GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
     format(var, 32, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
     format(var, 32, "Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
     format(var, 32, "Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
     format(var, 32, "Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
     format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
     format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
     format(var, 32, "House=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
     format(var, 32, "Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
     if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
     {
      PlayerInfo[playerid][pPos_x] = 1743.4004;
      PlayerInfo[playerid][pPos_y] = -1860.3623;
      PlayerInfo[playerid][pPos_z] = 13.5788;
     }
     if(Spectate[playerid] != 255)
     {
      PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
      PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
      PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
      PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
      PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
     }
     format(var, 32, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
     format(var, 32, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
     format(var, 32, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
     format(var, 32, "CarLicA=%d\n",PlayerInfo[playerid][pCarLicA]);fwrite(hFile, var);
     format(var, 32, "CarLicB=%d\n",PlayerInfo[playerid][pCarLicB]);fwrite(hFile, var);
     format(var, 32, "CarLicC=%d\n",PlayerInfo[playerid][pCarLicC]);fwrite(hFile, var);
                 format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
     format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
     format(var, 32, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
     format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
     format(var, 32, "CarTime=%d\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
     format(var, 32, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
     format(var, 32, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
     format(var, 32, "CDPlayer=%d\n",PlayerInfo[playerid][pCDPlayer]);fwrite(hFile, var);
     format(var, 32, "Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
     format(var, 32, "Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
     format(var, 32, "AlcoholPerk=%d\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
     format(var, 32, "DrugPerk=%d\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
     format(var, 32, "MiserPerk=%d\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
     format(var, 32, "PainPerk=%d\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
     format(var, 32, "TraderPerk=%d\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
     format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
     format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
     format(var, 32, "Adjustable=%d\n",PlayerInfo[playerid][pAdjustable]);fwrite(hFile, var);
     format(var, 32, "Fuel=%d\n",PlayerInfo[playerid][pFuel]);fwrite(hFile, var);
     format(var, 32, "Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
     format(var, 32, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
     format(var, 32, "Passport=%d\n",PlayerInfo[playerid][pPass]);fwrite(hFile, var);
     format(var, 32, "PassNr=%d\n",PlayerInfo[playerid][pPassnum]);fwrite(hFile, var);
     format(var, 32, "Radio=%d\n",PlayerInfo[playerid][pRadio]);fwrite(hFile, var);
     format(var, 32, "Vigovor=%d\n",PlayerInfo[playerid][pVig]);fwrite(hFile, var);
     format(var, 32, "MuteTime=%d\n",PlayerInfo[playerid][pMuteTime]);fwrite(hFile, var);
     format(var, 32, "NameTime=%d\n",PlayerInfo[playerid][pNameTime]);fwrite(hFile, var);
     format(var, 32, "Medics=%d\n",PlayerInfo[playerid][pMed]);fwrite(hFile, var);
     format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pBank]);fwrite(hFile, var);
     format(var, 32, "Card=%d\n",PlayerInfo[playerid][pCard]);fwrite(hFile, var);
     format(var, 32, "Ban=%d\n",PlayerInfo[playerid][pLocked]);fwrite(hFile, var);
     format(var, 32, "Zakonop=%d\n",PlayerInfo[playerid][pZakonp]);fwrite(hFile, var);
     fclose(hFile);
     OnPlayerLogin(playerid,password);
    }
  }
  return 1;
}

Eduardo_ShiftДата: Среда, 30.11.2011, 19:52 | Сообщение # 3131
Новенький
Группа: Пользователи
Сообщений: 32
Награды: 2
Город: Рождён там, где курили план .
Репутация: 23
Замечания: 20%
Статус:
Всем привет :)
Quote
if(race[playerid]<sizeof(Race))SetPlayerRaceCheckpoint(playerid,0,Race[race[playerid]][0],Race[race[playerid]][1],Race[race[playerid]][2],Race[race[playerid]][3],Race[race[playerid]][4],Race[race[playerid]][5],5.0);

Как сделать, что бы после прохождения чекпойнта, вылазил текст ?
Помогите пожалуйста ?



Помог ?
Дай +
SevDДата: Среда, 30.11.2011, 20:16 | Сообщение # 3132
Группа: Продвинутые
Сообщений: 456
Награды: 38
Город: Москва
Репутация: 452
Замечания: 0%
Статус:
Eduardo_Shift, ищи public OnPlayerEnterCheckpoint(playerid)
Там делай все что надо



Bye-bye SA-MP 0/
Hello EVE Online ^.^
Eduardo_ShiftДата: Среда, 30.11.2011, 20:25 | Сообщение # 3133
Новенький
Группа: Пользователи
Сообщений: 32
Награды: 2
Город: Рождён там, где курили план .
Репутация: 23
Замечания: 20%
Статус:
Quote (SevD)
Eduardo_Shift, ищи public OnPlayerEnterCheckpoint(playerid)
Там делай все что надо

Эм ...
Я а как определить чекпойнт ?
То есть, что бы мне на одном писало одно, на другом, другое ?



Помог ?
Дай +
RonaldДата: Среда, 30.11.2011, 20:53 | Сообщение # 3134
Уверенный в себе
Группа: Пользователи
Сообщений: 274
Награды: 31
Город: Ярославль
Репутация: 258
Замечания: 0%
Статус:
Quote (Eduardo_Shift)

if(race[playerid]<sizeof(Race))
SetPlayerRaceCheckpoint(playerid,0,Race[race[playerid]][0],Race[race[playerid]][1],Race[race[playerid]][2],Race[race[playerid]][3],Race[race[playerid]][4],Race[race[playerid]][5],5.0);
SetPVarInt(playerid, "Checkpoint1", 1);

...

public OnPlayerEnterRaceCheckpoint(playerid)
{
if(GetPVarInt(playerid, "Checkpoint1") == 1)) SendClientMessage(playerid, COLOR_RED, "Бла, бла, бла");
return 1;
}






Сообщение отредактировал Ronald - Среда, 30.11.2011, 20:53
Eduardo_ShiftДата: Среда, 30.11.2011, 20:54 | Сообщение # 3135
Новенький
Группа: Пользователи
Сообщений: 32
Награды: 2
Город: Рождён там, где курили план .
Репутация: 23
Замечания: 20%
Статус:
Ronald, Для каждого нужно разное ...


Помог ?
Дай +
Поиск:





 


 


 
Хостинг от uCoz samp.at.ua