25.09.2014, 04:24
Thanks and by you know where do i put this ?
pawn Код:
forward OnAccountLoad(playerid);
forward OnAccountRegister(playerid);
public OnAccountLoad(playerid)
{
pInfo[playerid][Admin] = cache_get_field_content_int(0, "Admin");
pInfo[playerid][VIP] = cache_get_field_content_int(0, "VIP");
pInfo[playerid][Money] = cache_get_field_content_int(0, "Money");
pInfo[playerid][posX] = cache_get_field_content_float(0, "PosX");
pInfo[playerid][posY] = cache_get_field_content_float(0, "PosY");
pInfo[playerid][posZ] = cache_get_field_content_float(0, "PosZ");
GivePlayerMoney(playerid, pInfo[playerid][Money]);
SendClientMessage(playerid, -1, "Successfully logged in");
return 1;
}
public OnAccountRegister(playerid)
{
pInfo[playerid][ID] = cache_insert_id();
printf("New account registered. ID: %d", pInfo[playerid][ID]);
return 1;
}
}