28.11.2015, 22:34
Evacuation info:
Load user stats:
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(team[playerid] == TEAM_HUMAN)
{
new string[256];
if(Map[EvacType] == 1)
{
SetPlayerInterior(playerid,17);
SetPlayerPos(playerid,487.3870,-13.7815,1000.6797);
format(string,sizeof(string), ""chat""COL_LGREEN"{ffffff} %s{99CCFF} made it to evacuation point and has received {FFD700}1 Token{99CCFF}!",PlayerName(playerid));
SendClientMessageToAll(-1,string);
DisablePlayerCheckpoint(playerid);
CurePlayer(playerid);
GivePlayerXP(playerid,10);
GivePlayerCash(playerid,100);
pInfo[playerid][pEvac]++;
pInfo[playerid][pCoins]++;
SetPlayerColor(playerid,COLOR_YELLOW);
UpdateTokensTextdraw(playerid);
SetPlayerScore(playerid,pInfo[playerid][pXP]);
SetPlayerCash(playerid,pInfo[playerid][pCash]);
UpdateXPTextdraw(playerid);
}
}
return 1;
}
PHP код:
public LoadUser_data(playerid,name[],value[])
{
INI_String("pPassword", pInfo[playerid][pPassword], 129);
INI_Int("pCash",pInfo[playerid][pCash]);
INI_Int("pXP",pInfo[playerid][pXP]);
INI_Int("pKills",pInfo[playerid][pKills]);
INI_Int("pDeaths",pInfo[playerid][pDeaths]);
INI_Int("pHeads",pInfo[playerid][pHeads]);
INI_Int("pRank",pInfo[playerid][pRank]);
INI_Int("pEvac",pInfo[playerid][pEvac]);
INI_Int("pAdminLevel",pInfo[playerid][pAdminLevel]);
INI_Int("pAdminDuty",pInfo[playerid][pAdminDuty]);
INI_Int("pVipLevel",pInfo[playerid][pVipLevel]);
INI_Int("pHour",pInfo[playerid][pHour]);
INI_Int("pMin",pInfo[playerid][pMin]);
INI_Int("pSec",pInfo[playerid][pSec]);
INI_Int("pMapsPlayed",pInfo[playerid][pMapsPlayed]);
INI_Int("pCoins",pInfo[playerid][pCoins]);
INI_Int("pBanned",pInfo[playerid][pBanned]);
printf("Password: %s", pInfo[playerid][pPassword]);
return 1;
}